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 4aa655073bd8cc4f70a8357ccbc285e68b568282..e6159684954581f2b05213097bd0afac75037c8f 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 @@ -1,4 +1,4 @@ - <bgp xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> + <bgp xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> {% if pe_bgp_base.best_path_selection is defined %} <best-path-selection> {% for bps in pe_bgp_base.best_path_selection %} @@ -32,4 +32,5 @@ {% with bgp_obj=pe_bgp_internal %} {% include "router/bgp_group.j2" %} {% endwith %} - </bgp> + </bgp> + diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/flowspec.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/flowspec.j2 index 22a7f05d5b0a130f242c812860b429d45d4113d6..e1f40f15591b33f7c89caf5c99ceac6783e1c172 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/flowspec.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/flowspec.j2 @@ -1,5 +1,6 @@ -<flowspec alu:operation="replace"> - <ip-filter-max-size>{{ nokia_flowspec.ip_filter_max_size }}</ip-filter-max-size> - <ipv6-filter-max-size>{{ nokia_flowspec.ipv6_filter_max_size }}</ipv6-filter-max-size> -</flowspec> + <flowspec alu:operation="replace"> + <ip-filter-max-size>{{ nokia_flowspec.ip_filter_max_size }}</ip-filter-max-size> + <ipv6-filter-max-size>{{ nokia_flowspec.ipv6_filter_max_size }}</ipv6-filter-max-size> + </flowspec> + diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/isis_overload.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/isis_overload.j2 index e2301caa6576e7c4efc3ec225b72b9fdc917587a..c8d177abbfd4d3d0ab9fac1493535533e03fb2af 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/isis_overload.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/isis_overload.j2 @@ -2,11 +2,15 @@ <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"> <router xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> <router-name>Base</router-name> - <isis xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> - {% if set_isis_overload is defined %} - <overload></overload> - {% elif remove_isis_overload is defined %} - <overload alu:operation="delete"></overload> + <isis> + <isis-instance>0</isis-instance> + {% if verb == 'set_isis_overload' %} + <overload xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> + </overload> + {% endif %} + {% if verb == 'remove_isis_overload' %} + <overload xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="delete"> + </overload> {% endif %} </isis> </router> diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/ldp.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/ldp.j2 index b6799a52d39c32426ca9b388939f68a84bd64a9d..8a312b716654e67525ec4dfde5448d33e2d3fa24 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/ldp.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/ldp.j2 @@ -4,4 +4,4 @@ <sdp-auto-targeted-session>true</sdp-auto-targeted-session> </targeted-session> </ldp> - + diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/router_base.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/router_base.j2 index 961cd5c7fc65c621a9f90d808aec3f3aa2eaa3d7..ce792e856c3f5eb97ac854e2e5870a47f37ce0f0 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/router_base.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/router_base.j2 @@ -1,8 +1,13 @@ <router xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> <router-name>Base</router-name> + {% with static_routes_obj=nokia_pe_static_routes %} {% include 'router/static_routes.j2' %} - {% include 'router/bgp.j2' %} + {% endwith %} + {% with bgp_group_context='bgp_base' %} + {% include 'router/base_bgp.j2' %} + {% endwith %} {% include 'router/flowspec.j2' %} {% include 'router/ldp.j2' %} {% include 'router/rpki.j2' %} </router> + diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/rpki.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/rpki.j2 index 3f60b99b1ecbcb90195f0810e302535a8da461a2..ce18ab742af4c1b4b1608f54f8006aaa0327dbf7 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/rpki.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/rpki.j2 @@ -1,13 +1,13 @@ -<origin-validation xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> - {% for validator in pe_rpki.validators %} - <rpki-session alu:operation="replace"> - <ip-address>{{ validator.ip }}</ip-address> - <admin-state>{{ validator.admin_state | default('enable') }}</admin-state> - <connect-retry>{{ validator.connect_retry }}</connect-retry> - <local-address>{{ lo_ipv4_address }}</local-address> - <port>{{ validator.port }}</port> - <stale-time>{{ validator.stale_time }}</stale-time> - </rpki-session> - {% endfor %} -</origin-validation> + <origin-validation xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> + {% for validator in pe_rpki.validators %} + <rpki-session alu:operation="replace"> + <ip-address>{{ validator.ip }}</ip-address> + <admin-state>{{ validator.admin_state | default('enable') }}</admin-state> + <connect-retry>{{ validator.connect_retry }}</connect-retry> + <local-address>{{ lo_ipv4_address }}</local-address> + <port>{{ validator.port }}</port> + <stale-time>{{ validator.stale_time }}</stale-time> + </rpki-session> + {% endfor %} + </origin-validation> diff --git a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/static_routes.j2 b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/static_routes.j2 index 2b16762a899bc74abf3c4a618ef5faf6b8d7319a..1c1d8f4b68394be625b67cef8261ed0b16278036 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/static_routes.j2 +++ b/geant/gap_ansible/roles/promote_p_to_pe/templates/routers/nokia/router/static_routes.j2 @@ -1,36 +1,38 @@ - {% for route in static_routes_obj %} - <route alu:operation="replace"> - <ip-prefix>{{ route.ip_prefix }}</ip-prefix> - <route-type>{{ route.route_type }}</route-type> - {% if route.indirect is defined %} - {% for ir in route.indirect %} - <indirect> - <ip-address>{{ ir.next_hop }}</ip-address> - <admin-state>{{ ir.admin_state }}</admin-state> - {% if ir.description is defined %} - <description>{{ ir.description }}</description> - {% endif %} - {% if ir.preference is defined %} - <preference>{{ ir.preference }}</preference> - {% endif %} - </indirect> - {% endfor %} - {% endif %} - {# Blackhole #} - {% if route.blackhole is defined %} - <blackhole> - <admin-state>{{ route.blackhole.admin_state }}</admin-state> - {% if route.blackhole.description is defined %} - <description>{{ route.blackhole.description }}</description> - {% endif %} - </blackhole> - {% endif %} - {# Communities #} - {% if route.communities is defined %} - {% for community in route.communities %} - <community>{{ community }}</community> - {% endfor %} - {% endif %} - </route> - {% endfor %} + <static-routes xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> + {% for route in static_routes_obj %} + <route alu:operation="replace"> + <ip-prefix>{{ route.ip_prefix }}</ip-prefix> + <route-type>{{ route.route_type }}</route-type> + {% if route.indirect is defined %} + {% for ir in route.indirect %} + <indirect> + <ip-address>{{ ir.next_hop }}</ip-address> + <admin-state>{{ ir.admin_state }}</admin-state> + {% if ir.description is defined %} + <description>{{ ir.description }}</description> + {% endif %} + {% if ir.preference is defined %} + <preference>{{ ir.preference }}</preference> + {% endif %} + </indirect> + {% endfor %} + {% endif %} + {# Blackhole #} + {% if route.blackhole is defined %} + <blackhole> + <admin-state>{{ route.blackhole.admin_state }}</admin-state> + {% if route.blackhole.description is defined %} + <description>{{ route.blackhole.description }}</description> + {% endif %} + </blackhole> + {% endif %} + {# Communities #} + {% if route.communities is defined %} + {% for community in route.communities %} + <community>{{ community }}</community> + {% endfor %} + {% endif %} + </route> + {% endfor %} + </static-routes> 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 4444e061cfb8461b071afa7a41b9d158c0ce0f78..fa0ebb640e58520e9d0de5c29b58e3e7d7dd536a 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 @@ -40,15 +40,13 @@ </best-path-selection> {% endif %} {% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %} - {% include 'bgp_group.j2' %} + {% include 'router/bgp_group.j2' %} {% endwith %} </bgp> {% if vprn.static_routes is defined %} - <static-routes> {% with static_routes_obj=vprn.static_routes %} - {% include 'static_routes.j2' %} + {% include 'router/static_routes.j2' %} {% endwith %} - </static-routes> {% endif %} {% if vprn.flowspec is defined %} <flowspec> @@ -59,3 +57,4 @@ </vprn> {% endfor %} </service> +