Bug 225 - added support for depth RESTCONF parameter in URI 25/5325/5
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)
commit0c3deecf9e9f8e5eb2c099c784f417f938134c89
treede7c75fbcb787ce6343b6971110d05f8a3361d4e
parent9b27843e133b80ad14d4af60eb865b2e13094d5e
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]