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 @@
</shortcut-tunnel>
</next-hop-resolution>
{% 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 %}
{% include "router/bgp_group.j2" %}
{% include "router/bgp_neighbor.j2" %}
......
......@@ -3,27 +3,44 @@
<ip-address>{{ neighbor.ip }}</ip-address>
<description>{{ neighbor.description }}</description>
<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>
{% for family in neighbor.families %}
<{{ family }}>true</{{ family }}>
{% endfor %}
</family>
{% endif %}
{% if neighbor.policies.import is defined %}
{% endif %}
{% if neighbor.policies.import is defined %}
<import>
{% for imp_pol in neighbor.policies.import %}
<policy>{{ imp_pol }}</policy>
{% endfor %}
</import>
{% endif %}
{% if neighbor.policies.export is defined %}
{% endif %}
{% if neighbor.policies.export is defined %}
<export>
{% for exp_pol in neighbor.policies.export %}
<policy>{{ exp_pol }}</policy>
{% endfor %}
</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>
{% endfor %}
......@@ -38,6 +38,28 @@
{% endfor %}
</best-path-selection>
{% 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' %}
{% include 'router/bgp_group.j2' %}
{% endwith %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment