Bug 225 - added support for depth RESTCONF parameter in URI
authortpantelis <tpanteli@brocade.com>
Wed, 4 Jun 2014 22:53:36 +0000 (18:53 -0400)
committertpantelis <tpanteli@brocade.com>
Sat, 14 Jun 2014 08:47:58 +0000 (04:47 -0400)
commit2b04e23ed57cd94c0a271f5c9e5a648b25631832
tree1d24d7bfad93cbb914d11d0ec38b61c9caf3fc81
parenta02079149f1a397c0682f644a2e77e330d1f36f1
Bug 225 - added support for depth RESTCONF parameter in URI

Modified RestconfImpl to prune the resulting ComositeNode tree
based on the depth parameter, if specified.

A depth of 1 retrieves just the target resource and no children. This is
a way to determine if the resource exists. A depth of 2 retrieves the
target resource and just its direct children - any child container would
be empty.

Change-Id: I44d99f9886e3837a1bb13eda84aec3c4cc6b21ae
Signed-off-by: tpantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MediaTypesTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestGetOperationTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/modules/nested-module.yang [new file with mode: 0644]