From f12c3622b13234aaeb23e234cc8f45f01f44105a Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Thu, 12 Sep 2024 12:06:48 +0100
Subject: [PATCH] Add `ecmp` as an option to router Base and vprn

---
 .../roles/bc_templates/routers/nokia/router/router_base.j2     | 3 +++
 .../roles/bc_templates/routers/nokia/router/vprn.j2            | 3 +++
 2 files changed, 6 insertions(+)

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 97226c2c..9d3c8693 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,6 +1,9 @@
         <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' and pe_bgp_base.ecmp is defined %}
+            <ecmp>{{ pe_bgp_base.ecmp }}</ecmp>
+            {% endif %}
             <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>
diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2
index 23185e59..ec4648f9 100644
--- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2
+++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2
@@ -8,6 +8,9 @@
         <service-id>{{ vprn.service_id }}</service-id>
         <customer>{{ vprn.customer_id }}</customer>
         <autonomous-system>{{ vprn.asn }}</autonomous-system>
+        {% if vprn.ecmp is defined %}
+        <ecmp>{{ vprn.ecmp }}</ecmp>
+        {% endif %}
         <bgp-ipvpn>
             <mpls>
                 <admin-state>enable</admin-state>
-- 
GitLab