Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
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" :
}
then
POST http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1
{
"my-list2" :
}
result:
GET http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont
{
"patch-cont": {
"my-list1": [
{
"name": "leaf1",
"my-list2": [
,
{ "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" :
}
then
{
"my-list2" :
}
result:
{
"patch-cont": {
"my-list1": [
{
"name": "leaf1",
"my-list2": [
]
}
]
}
}
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" :
}
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.
Attachments
Issue Links
- blocks
-
NETCONF-234 support RESTCONF PATCH for mounted NETCONF nodes
- Resolved