From 4119c99cc91eaa7b95ec16b4276ac919bcfcf2cd Mon Sep 17 00:00:00 2001 From: Lluis Gifre <lluis.gifre@cttc.es> Date: Fri, 4 Mar 2022 16:07:50 +0100 Subject: [PATCH] Device: OpenConfig Driver: - updated delete operation for interfaces to just remove its description --- .../openconfig/templates/interface/edit_config.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/device/service/drivers/openconfig/templates/interface/edit_config.xml b/src/device/service/drivers/openconfig/templates/interface/edit_config.xml index ae29586a6..ff15d1d68 100644 --- a/src/device/service/drivers/openconfig/templates/interface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/interface/edit_config.xml @@ -1,12 +1,14 @@ <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 %}> + <interface{% if operation is defined and operation != 'delete' %} xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="{{operation}}"{% endif %}> <name>{{name}}</name> - {% if operation is not defined or operation != 'delete' %} <config> <name>{{name}}</name> + {% if operation is defined and operation == 'delete' %} + <description></description> + {% else %} <description>{{description}}</description> <mtu>{{mtu}}</mtu> + {% endif %} </config> - {% endif %} </interface> </interfaces> -- GitLab