[sonic-cfggen] Add check to generate valid bgpconfig (#440)
* [sonic-cfggen]Add check to generate valid bgpconfig Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com> * Use builtin none instead of None Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
This commit is contained in:
parent
5314230980
commit
713f6fc318
@ -14,6 +14,7 @@ log facility local4
|
|||||||
! enable password {# {{ en_passwd }} TODO: param needed #}
|
! enable password {# {{ en_passwd }} TODO: param needed #}
|
||||||
{% endblock system_init %}
|
{% endblock system_init %}
|
||||||
!
|
!
|
||||||
|
{% if minigraph_bgp_asn is not none %}
|
||||||
{% block bgp_init %}
|
{% block bgp_init %}
|
||||||
!
|
!
|
||||||
! bgp multiple-instance
|
! bgp multiple-instance
|
||||||
@ -34,6 +35,7 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock bgp_init %}
|
{% endblock bgp_init %}
|
||||||
|
{% endif %}
|
||||||
{% block vlan_advertisement %}
|
{% block vlan_advertisement %}
|
||||||
{% for vlan_interface in minigraph_vlan_interfaces %}
|
{% for vlan_interface in minigraph_vlan_interfaces %}
|
||||||
network {{ vlan_interface['subnet'] }}
|
network {{ vlan_interface['subnet'] }}
|
||||||
@ -57,8 +59,10 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock bgp_sessions %}
|
{% endblock bgp_sessions %}
|
||||||
!
|
!
|
||||||
|
{% if minigraph_bgp_asn is not none %}
|
||||||
maximum-paths 64
|
maximum-paths 64
|
||||||
!
|
!
|
||||||
route-map ISOLATE permit 10
|
route-map ISOLATE permit 10
|
||||||
set as-path prepend {{ minigraph_bgp_asn }}
|
set as-path prepend {{ minigraph_bgp_asn }}
|
||||||
|
{% endif %}
|
||||||
!
|
!
|
||||||
|
Reference in New Issue
Block a user