Details
-
Bug
-
Status: Resolved
-
Resolution: Duplicate
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
8878
Description
According to rfc8072, section 2.5., delete operation should return error when the data does not exist.
Steps to reproduce:
feature:install odl-restconf odl-clustering-test-app
Run curl:
curl -X PATCH --user admin:admin ${ODL_HOST}:8181/restconf/config/car:cars -v -H "Content-Type: application/yang.patch+json" -H "Accept: application/yang.patch-status+json" -d '
{
"ietf-restconf:yang-patch" : {
"patch-id" : "0",
"edit" : [
]
}
}
'
With no data in car:cars, returns 200 but outputs:
{"ietf-yang-patch:yang-patch-status":{"patch-id":"0","errors":{"error":[
]},"edit-status":{"edit":[
{"edit-id":"edit2","ok":[null]}]}}}
This is probably the same issue reported as NETCONF-429 .
However adding a car:
curl -v --user admin:admin $ODL_HOST:8181/restconf/config/car:cars/ -H "Content-Type: application/yang.data+json" -X PUT -d '
{ "cars" :
{"car-entry": [
]
}
}
'
And then executing PATCH delete operation multiple times will always result in status code 200 and output:
{"ietf-yang-patch:yang-patch-status":{"patch-id":"0","ok":[null]}}
Expected behavior:
According to the RFC the first delete operation should succeed with 200, all subsequent delete operations must fail with status code 404.
Attachments
Issue Links
- duplicates
-
NETCONF-429 Status code for patch error response is not proper.
- Resolved