[CONTROLLER-1162] wrong xml post response when data already exists Created: 18/Feb/15  Updated: 25/Jul/23  Resolved: 23/Jul/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Andrej Marcinek Assignee: Vaclav Demcak
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
duplicates CONTROLLER-1288 Sal Rest Connector: Data already exis... Resolved
External issue ID: 2730

 Description   

when i post new resource twice (same request) behind mountpoint in json, i get first response: "204 No Content" and second response: "409 Conflict, Data already exists..."

when i try same in xml i get first response: "204 No Content" and second response: "204 No Content". it should be "409 Conflict, Data already exists..."

similar bug was here https://bugs.opendaylight.org/show_bug.cgi?id=1002



 Comments   
Comment by Andrej Marcinek [ 18/Feb/15 ]

additionally:
if delete is performed, then restconf does not check if data exists. some check and then error message should be returned if data does not exists

Comment by Vratko Polak [ 18/Feb/15 ]

> if delete is performed, then restconf does not check if data exists.

So should this be re-opened?
https://bugs.opendaylight.org/show_bug.cgi?id=1839

Comment by Giles Heron [ 03/Mar/15 ]

Note that if the data is modified from the original POST (e.g. change the IP address for a NETCONF node) then both JSON and XML will accept the new POST and give a 204.

From my reading of the restconf draft that's incorrect. They should fail as POST is only supposed to create state, not replace it.

Comment by RichardHill [ 23/Jul/15 ]

Bug was raised against Helium RC4 , fix was post helium.

Generated at Wed Feb 07 19:54:50 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.