[CONTROLLER-777] DELETE operation doesn't delete attribute Created: 05/Sep/14  Updated: 19/Oct/17  Resolved: 05/Sep/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Jozef Jankula Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


External issue ID: 1718

 Description   

Test steps:

DELETE request is send
http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/<controller-config>/yang-ext:mount/Cisco-IOS-XR-parser-cfg:parser

Data:
<parser xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg">
<alias>
<commands>
<command>
<alias-name>
</alias-name>
<command>
</command>
</command>
</commands>
</alias>
</parser>

Response:
200 OK

But after get-config, alias is not deleted.

GET - get-config>
http://localhots:8080/restconf/config/opendaylight-inventory:nodes/node/<controller-config>/yang-ext:mount/Cisco-IOS-XR-parser-cfg:parser

Response:
200OK
<zdef456615885:parser
xmlns:zdef456615885="http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg">
<zdef456615885:alias>
<zdef456615885:commands>
<zdef456615885:command>
<zdef456615885:alias-name>michael</zdef456615885:alias-name>
<zdef456615885:command>show nothing</zdef456615885:command>
</zdef456615885:command>
</zdef456615885:commands>
</zdef456615885:alias>
</zdef456615885:parser>

From log file:
ODL sends following request

<rpc message-id="m-63" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<default-operation>none</default-operation>
<error-option>rollback-on-error</error-option>
<config>
<parser xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg" operation="delete"/>
</config>
</edit-config>
</rpc>

It seems to me in line
<parser xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg" operation="delete"/>

operation="delete" is missing

See attached log files.

Env:
org.opendaylight.controller.version = 0.1
org.opendaylight.controller.build.scm.version = 8b4d61d841649cd054bb62b20fcc64e87cc7c36d
org.opendaylight.controller.build.user = jenkins-controller
org.opendaylight.controller.build.workspace = **********
org.opendaylight.controller.build.timestamp = 1409854132914
org.opendaylight.controller.build.machine = **********
[odl@pce-guest33 opendaylight]$



 Comments   
Comment by Maros Marsalek [ 05/Sep/14 ]

https://git.opendaylight.org/gerrit/#/c/10850/

XmlStreamUtils omitted attributes for empty nodes.

Generated at Wed Feb 07 19:53:51 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.