Bug 3999: Create internal service to access restconf 86/27286/1
authorTom Pantelis <tpanteli@brocade.com>
Tue, 22 Sep 2015 14:27:56 +0000 (10:27 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 22 Sep 2015 14:29:26 +0000 (10:29 -0400)
commitebbacf23581dc9f12b1005b48ea41686749df61d
tree11011f6357126f8cba590bc40c9f1131dfcdb4e0
parent78c2284901c6689b362ddd20854e75214adb4ace
Bug 3999: Create internal service to access restconf

There are use cases for invoking restconf from internal code. However
issuing an HTTP request is problematic as one would need to know the
credentials and scheme (http or https).

So I added a JSONRestconfService interface and implementation with CRUD
methods that call the JSON readers/writers and RestconfImpl internally.
The implementation is advertised as an OSGi service via the config
system for consumption by clients.

I only added a service for JSON - an XML service could be added as well
later.

Change-Id: Ia3753846756ace29bc28aa0a1fe9d474a60f80ce
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
19 files changed:
features/restconf/pom.xml
features/restconf/src/main/resources/features.xml
opendaylight/restconf/sal-rest-connector-config/pom.xml
opendaylight/restconf/sal-rest-connector-config/src/main/resources/initial/10-restconf-service.xml [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/pom.xml
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/sal/restconf/service/JSONRestconfServiceModule.java [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/controller/config/yang/sal/restconf/service/JSONRestconfServiceModuleFactory.java [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/api/JSONRestconfService.java [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/JSONRestconfServiceImpl.java [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/QueryParametersParser.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfDocumentedException.java
opendaylight/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java
opendaylight/restconf/sal-rest-connector/src/main/yang/sal-restconf-service.yang [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/nn/to/json/test/NnToJsonLeafrefType.java
opendaylight/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/JSONRestconfServiceImplTest.java [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/test/resources/full-versions/make-toast-rpc-input.json [new file with mode: 0644]
opendaylight/restconf/sal-rest-connector/src/test/resources/full-versions/testCont1Data.json [new file with mode: 0644]
pom.xml