[NETCONF-273] Problem with HTTP operations on mounted devices Created: 09/Sep/16  Updated: 15/Mar/19  Resolved: 17/Oct/16

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

Type: Bug
Reporter: Ivan Hrasko Assignee: Andrej Mak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks NETCONF-234 support RESTCONF PATCH for mounted NE... Resolved
External issue ID: 6681

 Description   

Environment:
branch master, stable/boron, beryllium-sr3
feature-install odl-restconf-all odl-netconf-topology
install https://github.com/opendaylight/netconf/blob/c0488b3e5a8d1bbe2894eda5eb1254f6ced347a4/restconf/sal-rest-connector/src/main/yang/instance-identifier-patch-module.yang to mounted device

Invoke two consequent POSTs operations on server:
POST http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1

{
"my-list2" :

{ "name": "name" }

}

then

POST http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1

{
"my-list2" :

{ "name": "name-2" }

}

result:

GET http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont

{
"patch-cont": {
"my-list1": [
{
"name": "leaf1",
"my-list2": [

{ "name": "name" }

,

{ "name": "name-2" }

]
}
]
}
}

Invoke two consequent POST operations on mounted device:
POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

{
"my-list2" :

{ "name": "name" }

}

then

POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

{
"my-list2" :

{ "name": "name-2" }

}

result:

GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont

{
"patch-cont": {
"my-list1": [
{
"name": "leaf1",
"my-list2": [

{ "name": "name-2" }

]
}
]
}
}

PROBLEM:
On mounted device first inserted data is replaced by the second data.
I expect the result to be the same as when operations are invoked on server because the data in the first and in the second request are not the same (data has different list key (name)).

Next aspect of this bug is that existence check fails:

Invoke this POST operation on mounted device two times:
POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

{
"my-list2" :

{ "name": "name" }

}

PROBLEM:
Data already exists after invoking previous request for the first time. When invoking request for the second time I expect error "Data already exists for path..." but request is successful.
Data exists check fails only in json, in xml it works.

This bug blogs create, replace, merge and maybe delete/remove edit operations in YANG PATCH on mounted devices.



 Comments   
Comment by Andrej Mak [ 26/Sep/16 ]

There is a problem with handling of lists in netconf northbound server, which is used also by testtool if it is run with --md-sal true parameter.

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

Generated at Wed Feb 07 20:14:36 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.