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

trunk_interface Nokia templates

- Added trunk interface into protocols:
-- MPLS
-- RSVP
-- PIM
- Reverse delete in deprovision template
- General formatting
parent 39027bd8
No related branches found
No related tags found
1 merge request!88trunk_interface Nokia templates
Pipeline #85459 passed
......@@ -42,6 +42,21 @@
<interface-name>{{ local.ae_name }}.0</interface-name>
</interface>
</isis>
<mpls 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">
<interface alu:operation="delete">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</mpls>
<pim 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">
<interface alu:operation="delete">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</pim>
<rsvp 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">
<interface alu:operation="delete">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</rsvp>
</router>
{% endif %}
......
......@@ -21,71 +21,86 @@
{% set trunk_direction_name_sorted = trunk_direction_name|sort %}
{##}
{% for member in local.members %}
<port 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">
<port-id>{{ member.interface_name }}</port-id>
<admin-state>enable</admin-state>
<description>PHY INFRASTRUCTURE BACKBONE P_{{ local.ae_name }} | {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }} | {{ member.interface_description }}</description>
<ethernet>
<mode>network</mode>
<mtu>9212</mtu>
<lldp>
<dest-mac>
<mac-type>nearest-bridge</mac-type>
<receive>true</receive>
<transmit>true</transmit>
<tx-tlvs>
<port-desc>true</port-desc>
<sys-name>true</sys-name>
<sys-cap>true</sys-cap>
</tx-tlvs>
</dest-mac>
</lldp>
</ethernet>
</port>
<port 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">
<port-id>{{ member.interface_name }}</port-id>
<admin-state>enable</admin-state>
<description>PHY INFRASTRUCTURE BACKBONE P_{{ local.ae_name }} | {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }} | {{ member.interface_description }}</description>
<ethernet>
<mode>network</mode>
<mtu>9212</mtu>
<lldp>
<dest-mac>
<mac-type>nearest-bridge</mac-type>
<receive>true</receive>
<transmit>true</transmit>
<tx-tlvs>
<port-desc>true</port-desc>
<sys-name>true</sys-name>
<sys-cap>true</sys-cap>
</tx-tlvs>
</dest-mac>
</lldp>
</ethernet>
</port>
{% endfor %}
<lag 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">
<lag-name>{{ local.ae_name | lower }}</lag-name>
<admin-state>enable</admin-state>
<description>LAG INFRASTRUCTURE BACKBONE ${{ local.port_sid }} | {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }}</description>
<mode>network</mode>
<lacp>
<mode>active</mode>
<administrative-key>{{ (local.ae_name|split("-"))[1] }}</administrative-key>
</lacp>
<lag 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">
<lag-name>{{ local.ae_name | lower }}</lag-name>
<admin-state>enable</admin-state>
<description>LAG INFRASTRUCTURE BACKBONE ${{ local.port_sid }} | {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }}</description>
<mode>network</mode>
<lacp>
<mode>active</mode>
<administrative-key>{{ (local.ae_name|split("-"))[1] }}</administrative-key>
</lacp>
{% for member in local.members %}
<port>
<port-id>{{ member.interface_name }}</port-id>
</port>
<port>
<port-id>{{ member.interface_name }}</port-id>
</port>
{% endfor %}
</lag>
<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>
<interface alu:operation="replace">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
<admin-state>enable</admin-state>
<description>SRV_GLOBAL INFRASTRUCTURE BACKBONE #{{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }}-IPTRUNK ${{ trunk.id }}| {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }} | {{ common.description }}</description>
<ip-mtu>9000</ip-mtu>
<port>{{ local.ae_name | lower }}</port>
<ipv4>
<primary>
<address>{{(local.ipv4_address| split('/'))[0]}}</address>
<prefix-length>{{(local.ipv4_address| split('/'))[1]}}</prefix-length>
</primary>
</ipv4>
<ipv6>
<address>
<ipv6-address>{{(local.ipv6_address| split('/'))[0]}}</ipv6-address>
<prefix-length>{{(local.ipv6_address| split('/'))[1]}}</prefix-length>
</address>
</ipv6>
<qos>
<network-policy>GEANT_BASIC</network-policy>
</qos>
</interface>
</router>
</lag>
<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>
<interface alu:operation="replace">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
<admin-state>enable</admin-state>
<description>SRV_GLOBAL INFRASTRUCTURE BACKBONE #{{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }}-IPTRUNK ${{ trunk.id }}| {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }} | {{ common.description }}</description>
<ip-mtu>9000</ip-mtu>
<port>{{ local.ae_name | lower }}</port>
<ipv4>
<primary>
<address>{{(local.ipv4_address| split('/'))[0]}}</address>
<prefix-length>{{(local.ipv4_address| split('/'))[1]}}</prefix-length>
</primary>
</ipv4>
<ipv6>
<address>
<ipv6-address>{{(local.ipv6_address| split('/'))[0]}}</ipv6-address>
<prefix-length>{{(local.ipv6_address| split('/'))[1]}}</prefix-length>
</address>
</ipv6>
<qos>
<network-policy>GEANT_BASIC</network-policy>
</qos>
</interface>
{# Add new LAG trunk into standard protocols #}
<mpls 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">
<interface alu:operation="replace">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</mpls>
<pim 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">
<interface alu:operation="replace">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</pim>
<rsvp 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">
<interface alu:operation="replace">
<interface-name>{{ local.ae_name | lower }}.0</interface-name>
</interface>
</rsvp>
</router>
{% endif %}
{% endfor %}
</configure>
</configure>
</config>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment