Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
5730
Description
This is against Beryllium code that is not merged yet:
https://git.opendaylight.org/gerrit/#/c/36177/6
It is possible that I am sending wrong requests, or I am expecting behavior that is not implied by standard, but this is how it looks like when I manipulate model (from odl-clustering-test-app feature):
$ curl -u'admin:admin' -X PATCH -H "Content-Type:application/yang.patch+json" -d '{"ietf-restconf:yang-patch":{"patch-id":"0","edit":[{"edit-id":"0","operation":"replace","target":"/car:car-entry[car:id='"'"'0'"'"']","value":{"car:car-entry":[
{"id":"0"},
{"id":"1"}]}}]}' 127.0.0.1:8181/restconf/config/car:cars ;echo
{"ietf-yang-patch:yang-patch-status":{"patch-id":"0","ok":null}}
$ curl -u'admin:admin' 127.0.0.1:8181/restconf/config/car:cars ;echo
{"cars":{"car-entry":[
{"id":"1"},
{"id":"0"}]}}
$ curl -u'admin:admin' -X PATCH -H "Content-Type:application/yang.patch+json" -d '{"ietf-restconf:yang-patch":{"patch-id":"0","edit":[
{"edit-id":"0","operation":"delete","target":"/car:car-entry[car:id='"'"'0'"'"']"}]}' 127.0.0.1:8181/restconf/config/car:cars ;echo
{"ietf-yang-patch:yang-patch-status":{"patch-id":"0","ok":null}}
$ curl -u'admin:admin' 127.0.0.1:8181/restconf/config/car:cars ;echo
{"cars":{"car-entry":[
{"id":"1"},
{"id":"0"}]}}
I was expecting to only find
{"id":"1"} after the second PATCH. Is it a Bug or am I doing something wrong?
Maybe a unit test for deleting subset of list items could be added.