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

Move base_config role templates to bc_templates folder

parent fefeccbb
No related branches found
No related tags found
1 merge request!167PE base config - integrated into `base_config` role.
Showing
with 124 additions and 1 deletion
<ldp 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">
<admin-state>enable</admin-state>
<targeted-session>
<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' %}
{% endwith %}
{% with bgp_group_context='bgp_base' %}
{% include 'router/bgp.j2' %}
{% endwith %}
{% include 'router/flowspec.j2' %}
{% include 'router/ldp.j2' %}
{% include 'router/rpki.j2' %}
</router>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<interface-name>system</interface-name> <interface-name>system</interface-name>
</interface> </interface>
</rsvp> </rsvp>
{% include 'router/static_routes.j2' %} {% include 'router/base_static_routes.j2' %}
{% include 'router/bgp.j2' %} {% include 'router/bgp.j2' %}
{% include 'router/isis.j2' %} {% include 'router/isis.j2' %}
{% include 'router/pim.j2' %} {% include 'router/pim.j2' %}
......
<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>
<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>
{% for vprn in pe_vprns %}
<vprn alu:operation="replace">
<service-name>{{ vprn.name }}</service-name>
<admin-state>{{ vprn.admin_state | default('enable') }}</admin-state>
{% if vprn.description is defined %}
<description>{{ vprn.description }}</description>
{% endif %}
<service-id>{{ vprn.service_id }}</service-id>
<customer>{{ vprn.customer_id }}</customer>
<autonomous-system>{{ vprn.asn }}</autonomous-system>
<bgp-ipvpn>
<mpls>
<admin-state>enable</admin-state>
<route-distinguisher>{{ vprn.bgp_ipvpn.mpls.rd }}</route-distinguisher>
<vrf-target>
<community>{{ vprn.bgp_ipvpn.mpls.target }}</community>
</vrf-target>
<auto-bind-tunnel>
<resolution>{{ vprn.bgp_ipvpn.mpls.auto_bind_tunnel.resolution }}</resolution>
<resolution-filter>
<{{ vprn.bgp_ipvpn.mpls.auto_bind_tunnel.resolution_filter }}>true</{{ vprn.bgp_ipvpn.mpls.auto_bind_tunnel.resolution_filter }}>
</resolution-filter>
</auto-bind-tunnel>
</mpls>
</bgp-ipvpn>
<bgp>
{% with bgp_base_obj=vprn.bgp, bgp_context='vprn' %}
{% include 'router/bgp_base.j2' %}
{% endwith %}
{% with bgp_obj=vprn.bgp, bgp_group_context='vprn' %}
{% include 'router/bgp_group.j2' %}
{% endwith %}
</bgp>
{% if vprn.static_routes is defined %}
{% with static_routes_obj=vprn.static_routes %}
{% include 'router/static_routes.j2' %}
{% endwith %}
{% endif %}
{% if vprn.flowspec is defined %}
<flowspec>
<ip-filter-max-size>{{ vprn.flowspec.ip_filter_max_size }}</ip-filter-max-size>
<ipv6-filter-max-size>{{ vprn.flowspec.ipv6_filter_max_size }}</ipv6-filter-max-size>
</flowspec>
{% endif %}
</vprn>
{% endfor %}
{% if router_tier == '3' %}
{% set nokia_sfms=nokia_chassis.sr2se.sfms %}
{% else %}
{% set nokia_sfms=nokia_chassis.sr7.sfms %}
{% endif %}
{% for sfm in nokia_sfms %} {% for sfm in nokia_sfms %}
<sfm 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="replace"> <sfm 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="replace">
<sfm-slot>{{ sfm.sfm_id }}</sfm-slot> <sfm-slot>{{ sfm.sfm_id }}</sfm-slot>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment