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

updates and fixes to router templates

parent 7f7d3254
No related branches found
No related tags found
1 merge request!162promote-p-to-pe role
Showing with 76 additions and 64 deletions
<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 %} {% if pe_bgp_base.best_path_selection is defined %}
<best-path-selection> <best-path-selection>
{% for bps in pe_bgp_base.best_path_selection %} {% for bps in pe_bgp_base.best_path_selection %}
...@@ -32,4 +32,5 @@ ...@@ -32,4 +32,5 @@
{% with bgp_obj=pe_bgp_internal %} {% with bgp_obj=pe_bgp_internal %}
{% include "router/bgp_group.j2" %} {% include "router/bgp_group.j2" %}
{% endwith %} {% endwith %}
</bgp> </bgp>
<flowspec alu:operation="replace"> <flowspec alu:operation="replace">
<ip-filter-max-size>{{ nokia_flowspec.ip_filter_max_size }}</ip-filter-max-size> <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> <ipv6-filter-max-size>{{ nokia_flowspec.ipv6_filter_max_size }}</ipv6-filter-max-size>
</flowspec> </flowspec>
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
<configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"> <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 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> <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"> <isis>
{% if set_isis_overload is defined %} <isis-instance>0</isis-instance>
<overload></overload> {% if verb == 'set_isis_overload' %}
{% elif remove_isis_overload is defined %} <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 alu:operation="delete"></overload> </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 %} {% endif %}
</isis> </isis>
</router> </router>
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
<sdp-auto-targeted-session>true</sdp-auto-targeted-session> <sdp-auto-targeted-session>true</sdp-auto-targeted-session>
</targeted-session> </targeted-session>
</ldp> </ldp>
<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 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> <router-name>Base</router-name>
{% with static_routes_obj=nokia_pe_static_routes %}
{% include 'router/static_routes.j2' %} {% 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/flowspec.j2' %}
{% include 'router/ldp.j2' %} {% include 'router/ldp.j2' %}
{% include 'router/rpki.j2' %} {% include 'router/rpki.j2' %}
</router> </router>
<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"> <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 %} {% for validator in pe_rpki.validators %}
<rpki-session alu:operation="replace"> <rpki-session alu:operation="replace">
<ip-address>{{ validator.ip }}</ip-address> <ip-address>{{ validator.ip }}</ip-address>
<admin-state>{{ validator.admin_state | default('enable') }}</admin-state> <admin-state>{{ validator.admin_state | default('enable') }}</admin-state>
<connect-retry>{{ validator.connect_retry }}</connect-retry> <connect-retry>{{ validator.connect_retry }}</connect-retry>
<local-address>{{ lo_ipv4_address }}</local-address> <local-address>{{ lo_ipv4_address }}</local-address>
<port>{{ validator.port }}</port> <port>{{ validator.port }}</port>
<stale-time>{{ validator.stale_time }}</stale-time> <stale-time>{{ validator.stale_time }}</stale-time>
</rpki-session> </rpki-session>
{% endfor %} {% endfor %}
</origin-validation> </origin-validation>
{% for route in static_routes_obj %} <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">
<route alu:operation="replace"> {% for route in static_routes_obj %}
<ip-prefix>{{ route.ip_prefix }}</ip-prefix> <route alu:operation="replace">
<route-type>{{ route.route_type }}</route-type> <ip-prefix>{{ route.ip_prefix }}</ip-prefix>
{% if route.indirect is defined %} <route-type>{{ route.route_type }}</route-type>
{% for ir in route.indirect %} {% if route.indirect is defined %}
<indirect> {% for ir in route.indirect %}
<ip-address>{{ ir.next_hop }}</ip-address> <indirect>
<admin-state>{{ ir.admin_state }}</admin-state> <ip-address>{{ ir.next_hop }}</ip-address>
{% if ir.description is defined %} <admin-state>{{ ir.admin_state }}</admin-state>
<description>{{ ir.description }}</description> {% if ir.description is defined %}
{% endif %} <description>{{ ir.description }}</description>
{% if ir.preference is defined %} {% endif %}
<preference>{{ ir.preference }}</preference> {% if ir.preference is defined %}
{% endif %} <preference>{{ ir.preference }}</preference>
</indirect> {% endif %}
{% endfor %} </indirect>
{% endif %} {% endfor %}
{# Blackhole #} {% endif %}
{% if route.blackhole is defined %} {# Blackhole #}
<blackhole> {% if route.blackhole is defined %}
<admin-state>{{ route.blackhole.admin_state }}</admin-state> <blackhole>
{% if route.blackhole.description is defined %} <admin-state>{{ route.blackhole.admin_state }}</admin-state>
<description>{{ route.blackhole.description }}</description> {% if route.blackhole.description is defined %}
{% endif %} <description>{{ route.blackhole.description }}</description>
</blackhole> {% endif %}
{% endif %} </blackhole>
{# Communities #} {% endif %}
{% if route.communities is defined %} {# Communities #}
{% for community in route.communities %} {% if route.communities is defined %}
<community>{{ community }}</community> {% for community in route.communities %}
{% endfor %} <community>{{ community }}</community>
{% endif %} {% endfor %}
</route> {% endif %}
{% endfor %} </route>
{% endfor %}
</static-routes>
...@@ -40,15 +40,13 @@ ...@@ -40,15 +40,13 @@
</best-path-selection> </best-path-selection>
{% endif %} {% endif %}
{% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %} {% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %}
{% include 'bgp_group.j2' %} {% include 'router/bgp_group.j2' %}
{% endwith %} {% endwith %}
</bgp> </bgp>
{% if vprn.static_routes is defined %} {% if vprn.static_routes is defined %}
<static-routes>
{% with static_routes_obj=vprn.static_routes %} {% with static_routes_obj=vprn.static_routes %}
{% include 'static_routes.j2' %} {% include 'router/static_routes.j2' %}
{% endwith %} {% endwith %}
</static-routes>
{% endif %} {% endif %}
{% if vprn.flowspec is defined %} {% if vprn.flowspec is defined %}
<flowspec> <flowspec>
...@@ -59,3 +57,4 @@ ...@@ -59,3 +57,4 @@
</vprn> </vprn>
{% endfor %} {% endfor %}
</service> </service>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment