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 %}
<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>
<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>
......@@ -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>
......
......@@ -4,4 +4,4 @@
<sdp-auto-targeted-session>true</sdp-auto-targeted-session>
</targeted-session>
</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-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>
<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>
{% 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>
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment