Bug 3104 - Sal Rest Connector: Data already exists for path when adding 30/19530/14
authorJan Hajnar <jhajnar@cisco.com>
Mon, 4 May 2015 14:57:49 +0000 (16:57 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 27 May 2015 15:47:00 +0000 (15:47 +0000)
commit3d4dc18c01ebca47030284dde81988a44424d821
treee4f90a8029a57308a331f759ce37463a53f4f546
parent9055581e2aabac7478102c6b05f9118b443a9d64
Bug 3104 - Sal Rest Connector: Data already exists for path when adding
new item to list in augmentation

* changed XmlNormalizedNodeBodyReader and JsonNormalizedNodeBodyReader
to return YangInstanceIdentifier pointing to root of payload data.
* changed BrokerFacade datastore functions for PUT and POST to use
returned path from reader without modifications
* modified rest connector tests according to new behavior and added
tests for POST when payload is from augment/choice

Change-Id: Iac6a9853ea4c4529d2f484c464bd27123f4fafa2
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonNormalizedNodeBodyReader.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlNormalizedNodeBodyReader.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/BrokerFacade.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestJsonBodyReader.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestXmlBodyReader.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/BrokerFacadeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/instanceidentifier/json/json_augment_choice_container.json [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/instanceidentifier/json/json_augment_container.json [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/instanceidentifier/xml/xml_augment_choice_container.xml [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/instanceidentifier/xml/xml_augment_container.xml [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/instanceidentifier/yang/augment-module.yang