diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/base_bgp.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/base_bgp.j2 index e6159684954581f2b05213097bd0afac75037c8f..0b911be76645cdacaf2ae7e63a50deb93d595ca2 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/base_bgp.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/base_bgp.j2 @@ -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" %} diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_neighbor.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_neighbor.j2 index 12bf86f8dacf9a58ce21291381ee6b0c2faaf8fe..debe66131f3f5fdc2f40a9f2ab4331dac6e7124f 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_neighbor.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/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 %} diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2 index c6c049644f15d58cb914a40b34030c847ad0402c..fa8b93629adf476092c007d3e7fd1ea16289c5a1 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/vprn.j2 @@ -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 %}