From 8f6df645f387ca7cc9b987a54fb730068cf5c0aa Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local> Date: Fri, 12 Jul 2024 09:23:55 +0100 Subject: [PATCH] Base-config cleanup General and validation-related cleanup --- .../roles/base_config/tasks/deploy_base_config.yaml | 2 +- .../roles/base_config/templates/routers/nokia/general.j2 | 2 +- .../roles/base_config/templates/routers/nokia/qos/qos.j2 | 4 ++-- .../templates/routers/nokia/router/router_base.j2 | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml b/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml index ce174aec..8803e445 100644 --- a/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml +++ b/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml @@ -49,7 +49,7 @@ - name: Fail if there is any diff ansible.builtin.fail: - msg: There are diffs!!!! + msg: Base config drift detected!!! when: > output.changed | ansible.builtin.bool and diff --git a/geant/gap_ansible/roles/base_config/templates/routers/nokia/general.j2 b/geant/gap_ansible/roles/base_config/templates/routers/nokia/general.j2 index 703220a3..f237ae55 100644 --- a/geant/gap_ansible/roles/base_config/templates/routers/nokia/general.j2 +++ b/geant/gap_ansible/roles/base_config/templates/routers/nokia/general.j2 @@ -5,7 +5,7 @@ <contact alu:operation="replace">{{ nokia_system_contact }}</contact> <name alu:operation="replace">{{ short_hostname}}</name> <location alu:operation="replace">{{ nokia_snmp_location }}</location> - <load-balancing> + <load-balancing alu:operation="replace"> <l4-load-balancing>true</l4-load-balancing> <lsr-load-balancing>lbl-ip-l4-teid</lsr-load-balancing> <system-ip-load-balancing>true</system-ip-load-balancing> diff --git a/geant/gap_ansible/roles/base_config/templates/routers/nokia/qos/qos.j2 b/geant/gap_ansible/roles/base_config/templates/routers/nokia/qos/qos.j2 index 60e200cf..c942d4bf 100644 --- a/geant/gap_ansible/roles/base_config/templates/routers/nokia/qos/qos.j2 +++ b/geant/gap_ansible/roles/base_config/templates/routers/nokia/qos/qos.j2 @@ -32,7 +32,7 @@ {% endfor %} {% endfor %} </network-queue> - <network alu:operation="replace"> + <network alu:operation="replace"> {% for net_pol in nokia_qos_network_policies %} <network-policy-name>{{ net_pol.name }}</network-policy-name> <description>{{ net_pol.description }}</description> @@ -46,7 +46,7 @@ <dscp> <dscp-name>{{ dscp.name}}</dscp-name> <fc>{{ dscp.fc }}</fc> - <profile>{{ dscp.profile }}</profile> + <profile>{{ dscp.profile }}</profile> </dscp> {% endfor %} {% for lsp_exp in net_pol.ingress.lsp_exp %} diff --git a/geant/gap_ansible/roles/base_config/templates/routers/nokia/router/router_base.j2 b/geant/gap_ansible/roles/base_config/templates/routers/nokia/router/router_base.j2 index 3639ef60..3bc40fc7 100644 --- a/geant/gap_ansible/roles/base_config/templates/routers/nokia/router/router_base.j2 +++ b/geant/gap_ansible/roles/base_config/templates/routers/nokia/router/router_base.j2 @@ -20,10 +20,10 @@ </ipv6> </interface> <mpls-labels 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"> - <static-label-range>9968</static-label-range> + <static-label-range>{{ mpls_labels.static_label_range }}</static-label-range> <sr-labels> - <start>10000</start> - <end>19999</end> + <start>{{ mpls_labels.sr_label_start }}</start> + <end>{{ mpls_labels.sr_label_end }}</end> </sr-labels> </mpls-labels> <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"> -- GitLab