From 4402aa253183039ccd1b51323444fdd052b39edb Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Mon, 16 Sep 2024 20:28:24 +0100
Subject: [PATCH] Exclude portion of router_base if pe_promotion
To avoid including unnecessary vars into `promote_p_to_pe`
---
.../bc_templates/routers/nokia/router/router_base.j2 | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2
index f0670959..72e72de5 100644
--- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2
+++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2
@@ -1,9 +1,10 @@
<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>
<autonomous-system xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">{{ geant_re_as_number }}</autonomous-system>
- {% if (router_role == 'pe' or is_pe_promotion_wf) and pe_bgp_base.ecmp is defined %}
+ {% if (router_role == 'pe' or is_pe_promotion_wf) and pe_bgp_base.ecmp is defined %}
<ecmp>{{ pe_bgp_base.ecmp }}</ecmp>
- {% endif %}
+ {% endif %}
+ {% if not is_pe_promotion_wf %}
<router-id xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">{{ lo_ipv4_address }}</router-id>
<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">
<interface-name>system</interface-name>
@@ -41,11 +42,12 @@
<interface-name>system</interface-name>
</interface>
</rsvp>
- {% include 'router/base_static_routes.j2' %}
- {% include 'router/bgp.j2' %}
{% include 'router/isis.j2' %}
{% include 'router/pim.j2' %}
- {% if router_role == 'pe' %}
+ {% endif %}
+ {% include 'router/base_static_routes.j2' %}
+ {% include 'router/bgp.j2' %}
+ {% if router_role == 'pe' or is_pe_promotion_wf %}
{% include 'router/flowspec.j2' %}
{% include 'router/ldp.j2' %}
{% include 'router/rpki.j2' %}
--
GitLab