[CONTROLLER-1207] Restconf JSON PUT cannot update/create network-topology configuration data Created: 13/Mar/15  Updated: 25/Jul/23  Resolved: 23/Mar/15

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

Type: Bug
Reporter: Giorgio Garziano Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File RestconfJsonPUT_bug.txt    
External issue ID: 2843

 Description   

It is not possible to create or update the network-topology configuration data by Restconf JSON content-based PUT operation.

The Restconf JSON PUT operation returns ok, however when reading back the data it can be seen that nothing is being created inside the network-topology configuration data.

For example when issuing:

PUT http://127.0.0.1:8181/restconf/config/network-topology:network-topology

application/json

{
"network-topology": {
"topology": [

{ "topology-id": "test" }

]
}
}

However when reading back by Restconf GET, the following error is reported:

GET http://127.0.0.1:8181/restconf/config/network-topology:network-topology

application/json

ERROR OCCURRED:404
{
"errors":{
"error":[

{ "error-message":"Request could not be completed because the relevant data model content does not exist." , "error-tag":"data-missing", "error-type":"application" }

]
}
}

On the other hand, network-topology:network-topology configuration data can be read by Restconf GET and deleted by Restconf DELETE operations when already present as a result of the behavior of some feature installation (such as odl-netconf-connector-all, for example).

Workaround is to take advantage of application/xml content in place of JSON one.

As a attachment a file reporting the step I performed to reproduce systematically such issue.



 Comments   
Comment by Giorgio Garziano [ 13/Mar/15 ]

Attachment RestconfJsonPUT_bug.txt has been added with description: Steps used to reproduce systematically this issue

Comment by Jan Hajnar [ 23/Mar/15 ]

patch:
https://git.opendaylight.org/gerrit/#/c/16978/

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