From dc32fbb82671af64b0d78d93ee4a59371a9bef92 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Tue, 7 May 2024 16:32:35 +0000
Subject: [PATCH] Device - OpenConfig SBI driver:

- Corrected Jinja template for edit-config interface/subinterface
---
 .../interface/subinterface/edit_config.xml    | 29 +++++++++----------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml
index 20aecb90b..2d8d3ee07 100644
--- a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml
+++ b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml
@@ -1,5 +1,4 @@
-<interfaces xmlns="http://openconfig.net/yang/interfaces" 
-            xmlns:oc-ip="http://openconfig.net/yang/interfaces/ip" >
+<interfaces xmlns="http://openconfig.net/yang/interfaces">
     <interface{% if operation is defined %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %}>
         <name>{{name}}</name>
         {% if operation is defined and operation != 'delete' %}
@@ -31,20 +30,20 @@
                 </vlan>
                 {% endif %}
                 {% if address_ip is defined %}
-                <oc-ip:ipv4>
-                    <oc-ip:config>
+                <ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
+                    <config>
                         {% if mtu is defined %}<mtu>{{mtu}}</mtu>{% endif%}
-                    </oc-ip:config>
-                    <oc-ip:addresses>
-                        <oc-ip:address>
-                            <oc-ip:ip>{{address_ip}}</oc-ip:ip>
-                            <oc-ip:config>
-                                <oc-ip:ip>{{address_ip}}</oc-ip:ip>
-                                <oc-ip:prefix-length>{{address_prefix}}</oc-ip:prefix-length>
-                            </oc-ip:config>
-                        </oc-ip:address>
-                    </oc-ip:addresses>
-                </oc-ip:ipv4>
+                    </config>
+                    <addresses>
+                        <address>
+                            <ip>{{address_ip}}</ip>
+                            <config>
+                                <ip>{{address_ip}}</ip>
+                                <prefix-length>{{address_prefix}}</prefix-length>
+                            </config>
+                        </address>
+                    </addresses>
+                </ipv4>
                 {% endif %}
             </subinterface>
         </subinterfaces>
-- 
GitLab