diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_base.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_base.j2 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..965c97b04b538bae743600c6fae9a6a095daedc1 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_base.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/bgp_base.j2 @@ -0,0 +1,55 @@ + {% if bgp_context == 'vprn' %} + {% if bgp_base_obj.families is defined %} + {% for fam in bgp_base_obj.families %} + <{{ fam }}>true</{{ fam }}> + {% endfor %} + {% endif %} + {% endif %} + {% if bgp_base_obj.best_path_selection is defined %} + <best-path-selection> + {% for bps in bgp_base_obj.best_path_selection %} + <{{ bps }}>true</{{ bps }}> + {% endfor %} + </best-path-selection> + {% endif %} + {% if bgp_base_obj.error_handling is defined %} + <error-handling> + <{{ bgp_base_obj.error_handling }}>true</{{ pe_bgp_base.error_handling }}> + </error-handling> + {% endif %} + {% if bgp_base_obj.next_hop_resolution.shortcut_tunnel is defined %} + <next-hop-resolution> + <shortcut-tunnel> + {% for nhr in bgp_base_obj.next_hop_resolution.shortcut_tunnel %} + <family> + <family-type>{{ nhr.type }}</family-type> + <resolution-filter> + <{{ nhr.resolution_filter }}>true</{{ nhr.resolution_filter }}> + </resolution-filter> + </family> + {% endfor %} + </shortcut-tunnel> + </next-hop-resolution> + {% endif %} + {% if bgp_base_obj.multipath is defined %} + <multipath alu:operation="replace"> + {% if bgp_base_obj.multipath.ibgp is defined %} + <ibgp>{{ bgp_base_obj.multipath.ibgp }}</ibgp> + {% endif %} + {% if bgp_base_obj.multipath.ebgp is defined %} + <ebgp>{{ bgp_base_obj.multipath.ebgp }}</ebgp> + {% endif %} + {% if bgp_base_obj.multipath.ipv4 is defined %} + <family> + <family-type>ipv4</family-type> + <max-paths>{{ bgp_base_obj.multipath.ipv4 }}</max-paths> + </family> + {% endif %} + {% if bgp_base_obj.multipath.ipv6 is defined %} + <family> + <family-type>ipv6</family-type> + <max-paths>{{ bgp_base_obj.multipath.ipv6 }}</max-paths> + </family> + {% endif %} + </multipath> + {% endif %}