diff --git a/geant/gap_ansible/CHANGELOG.md b/geant/gap_ansible/CHANGELOG.md index 3794ad0fb3bd6c40416287271e29b5476956ee23..01ebd98ce086c48f4d0438d8defd6bc7457524a4 100644 --- a/geant/gap_ansible/CHANGELOG.md +++ b/geant/gap_ansible/CHANGELOG.md @@ -1,4 +1,9 @@ # GAP Ansible changelog +1.0.50: +- basic support for the iptrunk_migration workflow: + mx-mx trunk -> mx-nokia trunk. +1.0.49: +- get rid of the hardcoded `remote_user` in playbooks. 1.0.48: - fix PIM fw filter - add redundancy rollback config diff --git a/geant/gap_ansible/galaxy.yml b/geant/gap_ansible/galaxy.yml index c5fb0184f51dee61dd3ef90d844ee251307121d3..6859564dac0220c430e5e6c6cf8722b54af7b734 100644 --- a/geant/gap_ansible/galaxy.yml +++ b/geant/gap_ansible/galaxy.yml @@ -8,7 +8,7 @@ namespace: geant name: gap_ansible # The version of the collection. Must be compatible with semantic versioning -version: 1.0.48 +version: 1.0.50 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/geant/gap_ansible/roles/iptrunk_migration/templates/nokia/trunk_deprovision.j2 b/geant/gap_ansible/roles/iptrunk_migration/templates/nokia/trunk_deprovision.j2 new file mode 100644 index 0000000000000000000000000000000000000000..0bde57add0401f80536d02221386a4e57ca6c6be --- /dev/null +++ b/geant/gap_ansible/roles/iptrunk_migration/templates/nokia/trunk_deprovision.j2 @@ -0,0 +1,66 @@ +<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0"> + <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"> + +{##} +{% for trunk in trunks %} + {% if inventory_hostname == trunk.config.nodeA.name %} + {% set local= trunk.config.nodeA %} + {% set remote= trunk.config.nodeB %} + {% set common= trunk.config.common %} + {% endif %} + {% if inventory_hostname == trunk.config.nodeB.name %} + {% set local= trunk.config.nodeB %} + {% set remote= trunk.config.nodeA %} + {% set common= trunk.config.common %} + {% endif %} + + {% if local is defined %} + {##} + {# I need to sort the source and the destination alfabetically #} + {% set trunk_direction_name = [ local.name.split(".")[1] | upper, remote.name.split(".")[1] | upper ] %} + {% 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="delete"> + <port-id>{{ member.interface_name }}</port-id> + </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="delete"> + <lag-name>{{ local.ae_name }}</lag-name> + </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="delete"> + <interface-name>{{ local.ae_name }}.0</interface-name> + </interface> + <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-instance>0</isis-instance> + <interface 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"> + <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"> + <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"> + <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"> + <interface alu:operation="delete"> + <interface-name>{{ local.ae_name | lower }}.0</interface-name> + </interface> + </rsvp> + </router> + + {% endif %} +{% endfor %} + + </configure> +</config>