Skip to content
Snippets Groups Projects
Commit 1128bebc authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Merge branch 'feature/nat-767-bgp-multipath' into 'develop'

BGP neighbor template update

See merge request !165
parents d2c06774 c22470e2
No related branches found
No related tags found
1 merge request!165BGP neighbor template update
Pipeline #88843 passed
...@@ -25,6 +25,28 @@ ...@@ -25,6 +25,28 @@
</shortcut-tunnel> </shortcut-tunnel>
</next-hop-resolution> </next-hop-resolution>
{% endif %} {% endif %}
{% if pe_bgp_base.multipath is defined %}
<multipath alu:operation="replace">
{% if pe_bgp_base.multipath.ibgp is defined %}
<ibgp>{{ pe_bgp_base.multipath.ibgp }}</ibgp>
{% endif %}
{% if pe_bgp_base.multipath.ebgp is defined %}
<ebgp>{{ pe_bgp_base.multipath.ebgp }}</ebgp>
{% endif %}
{% if pe_bgp_base.multipath.ipv4 is defined %}
<family>
<family-type>ipv4</family-type>
<max-paths>{{ pe_bgp_base.multipath.ipv4 }}</max-paths>
</family>
{% endif %}
{% if pe_bgp_base.multipath.ipv6 is defined %}
<family>
<family-type>ipv6</family-type>
<max-paths>{{ pe_bgp_base.multipath.ipv6 }}</max-paths>
</family>
{% endif %}
</multipath>
{% endif %}
{% with bgp_obj=pe_bgp_tools %} {% with bgp_obj=pe_bgp_tools %}
{% include "router/bgp_group.j2" %} {% include "router/bgp_group.j2" %}
{% include "router/bgp_neighbor.j2" %} {% include "router/bgp_neighbor.j2" %}
......
...@@ -3,27 +3,44 @@ ...@@ -3,27 +3,44 @@
<ip-address>{{ neighbor.ip }}</ip-address> <ip-address>{{ neighbor.ip }}</ip-address>
<description>{{ neighbor.description }}</description> <description>{{ neighbor.description }}</description>
<group>{{ neighbor.group }}</group> <group>{{ neighbor.group }}</group>
{% if neighbor.families is defined %} {% if neighbor.auth_key is defined %}
<authentication-key>{{ neighbor.auth_key }</authentication-key>
{% endif %}
{% if neighbor.hold_time is defined %}
<hold-time>
<seconds>{{ neighbor.hold_time }}</seconds>
</hold-time>
{% endif %}
{% if neighbor.families is defined %}
<family> <family>
{% for family in neighbor.families %} {% for family in neighbor.families %}
<{{ family }}>true</{{ family }}> <{{ family }}>true</{{ family }}>
{% endfor %} {% endfor %}
</family> </family>
{% endif %} {% endif %}
{% if neighbor.policies.import is defined %} {% if neighbor.policies.import is defined %}
<import> <import>
{% for imp_pol in neighbor.policies.import %} {% for imp_pol in neighbor.policies.import %}
<policy>{{ imp_pol }}</policy> <policy>{{ imp_pol }}</policy>
{% endfor %} {% endfor %}
</import> </import>
{% endif %} {% endif %}
{% if neighbor.policies.export is defined %} {% if neighbor.policies.export is defined %}
<export> <export>
{% for exp_pol in neighbor.policies.export %} {% for exp_pol in neighbor.policies.export %}
<policy>{{ exp_pol }}</policy> <policy>{{ exp_pol }}</policy>
{% endfor %} {% endfor %}
</export> </export>
{% endif %} {% endif %}
{% if neighbor.cluster_id is defined %}
<cluster>
{% if neighbor.cluster_id == 'system' %}
<cluster-id>{{ lo_ipv4_address }}</cluster-id>
{% else %}
<cluster-id>{{ neighbor.cluster_id }}</cluster-id>
{% endif %}
</cluster>
{% endif %}
</neighbor> </neighbor>
{% endfor %} {% endfor %}
...@@ -38,6 +38,28 @@ ...@@ -38,6 +38,28 @@
{% endfor %} {% endfor %}
</best-path-selection> </best-path-selection>
{% endif %} {% endif %}
{% if vprn.bgp.multipath is defined %}
<multipath>
{% if vprn.bgp.multipath.ibgp is defined %}
<ibgp>{{ vprn.bgp.multipath.ibgp }}</ibgp>
{% endif %}
{% if vprn.bgp.multipath.ebgp is defined %}
<ebgp>{{ vprn.bgp.multipath.ebgp }}</ebgp>
{% endif %}
{% if vprn.bgp.multipath.ipv4 is defined %}
<family>
<family-type>ipv4</family-type>
<max-paths>{{ vprn.bgp.multipath.ipv4 }}</max-paths>
</family>
{% endif %}
{% if vprn.bgp.multipath.ipv6 is defined %}
<family>
<family-type>ipv6</family-type>
<max-paths>{{ vprn.bgp.multipath.ipv6 }}</max-paths>
</family>
{% endif %}
</multipath>
{% endif %}
{% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %} {% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %}
{% include 'router/bgp_group.j2' %} {% include 'router/bgp_group.j2' %}
{% endwith %} {% endwith %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment