Details
-
Bug
-
Status: Resolved
-
Resolution: Won't Do
-
Helium
-
None
-
None
-
Operating System: Linux
Platform: PC
-
1661
Description
I am raising this as a bug because the presence or (lack of) of '/' leads to inconsistencies in describing the expected response.
TEST ENV
org.opendaylight.controller.version = 0.1
org.opendaylight.controller.build.scm.version = 78fec1c1c5a3720bd48d1044703824626f08b5d9
org.opendaylight.controller.build.user = jenkins-controller
org.opendaylight.controller.build.workspace = **********
org.opendaylight.controller.build.timestamp = 1409283738738
org.opendaylight.controller.build.machine = **********
I tried to save data which already exists in datastore in JSON format to a location behind /config root. I then tried to invoke an error response by saving the same data again. No special config was used.
Steps
method is: post
uri is: /restconf/config/opendaylight-inventory:nodes
headers is:
data is: {
"opendaylight-inventory:node":[
]
}
expected_status is: 204
and then repeat
method is: post
uri is: /restconf/config/opendaylight-inventory:nodes
headers is:
data is: {
"opendaylight-inventory:node":[
]
}
expected_status is: 409
expected response is
{
"errors": {
"error": [
{
"error-message": "Data already exists for path: (urn:opendaylight:inventory?revision=2013-08-19)nodes(urn:opendaylight:inventory?revision=2013-08-19)node[
]",
"error-tag": "data-exists",
"error-type": "protocol"
}
]
}
}
ACTUAL RESPONSE
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "data-exists",
"error-message": "Data already exists for path: /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node[
]"
}
]
}
}
NOTES
The path on the "error message" key also looks wrong. nodes is duplicated.