From 5af6232e61fc43b21075476023ba6c81f2defd57 Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Wed, 18 Sep 2024 18:03:30 +0100
Subject: [PATCH] SR2se-specific card config

---
 .../roles/bc_templates/routers/nokia/cards.j2 | 23 +++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2
index 1754c9fb..7af88af9 100644
--- a/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2
+++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2
@@ -3,18 +3,37 @@
 {% else %}
   {% set cards=nokia_cards.sr7 %}
 {% endif %}
+
   {% for card in cards %}
   <card 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">
       <slot-number>{{ card.slot }}</slot-number>
       <admin-state>enable</admin-state>
       <card-type>{{ card.card_type }}</card-type>
-  {%     for mda in card.mdas %}
+    {% if card.xiom is defined %}
+    {#Xiom is the SR2se specific config#}
+      <xiom>
+          <xiom-slot>{{ card.xiom.slot }}</xiom-slot>
+          <level>{{ card.xiom.level }}</level>
+          <xiom-type>{{ card.xiom.type }}</xiom-type>
+      {% for mda in card.mdas %}
+          <mda>
+              <mda-slot>{{mda.mda_slot}}</mda-slot>
+              <admin-state>enable</admin-state>
+              <mda-type>{{ mda.mda_type }}</mda-type>
+          </mda>
+      {% endfor %}
+      </xiom>
+    {% else %}
+    {#The rest is for SR7#}
+      {% for mda in card.mdas %}
       <mda>
           <mda-slot>{{mda.mda_slot}}</mda-slot>
           <admin-state>enable</admin-state>
           <mda-type>{{ mda.mda_type }}</mda-type>
           <level>{{ mda.mda_level }}</level>
       </mda>
-  {%     endfor %}
+      {% endfor %}
+    {% endif %}
   </card>
   {% endfor %}
+
-- 
GitLab