[CONTROLLER-751] Outer Container not returned in response during retrieval request for inner resource Created: 01/Sep/14  Updated: 09/Sep/14  Resolved: 09/Sep/14

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

Type: Bug
Reporter: RichardHill Assignee: Tony Tkacik
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Attachments: File opendaylight-inventory.yang     Text File opendaylight.log    
External issue ID: 1660

 Description   

I tried to save XML data using a POST statement to config root and then confirm it was there using GET retrieval request. This allow occurs using 'accept':'application/json'

#POST http://localhost:8080/restconf/config/

  1. Actual Response == Exepxted response

HTTP STATUS 204

then check want is in the configuration data store.
#GET

http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/id1

  1. Actual response

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<node
xmlns="urn:opendaylight:inventory">
<id>id1</id>
</node>

  1. Expected response:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<nodes>
<node
xmlns="urn:opendaylight:inventory">
<id>id1</id>
</node>
<nodes>

    1. Notes,

GET http://localhost:8080/restconf/config/opendaylight-inventory:nodes/
showed the nodes container as expected.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<nodes
xmlns="urn:opendaylight:inventory">
<node>
<id>controller-config</id>
</node>
<node>
<id>controller-config-xml</id>
</node>
<node>
<id>id1</id>
</node>
</nodes>

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 = **********
~

No special configuration was needed to replicate this bug. During this test I had 2 controllers ('controller-config' and 'controller-config-xrvr') configured but I don't believe that this affected the results.



 Comments   
Comment by RichardHill [ 01/Sep/14 ]

Attachment opendaylight.log has been added with description: opendaylight log - shows nothing unusual

Comment by RichardHill [ 01/Sep/14 ]

Attachment opendaylight-inventory.yang has been added with description: yang document describing schema tree

Comment by Tony Tkacik [ 08/Sep/14 ]

Could you please point out to part of Restconf specification which mandates this behaviour to return parent node?

List node (without returning parent) is there currently by design, not by accident.

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