X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fapi%2FRestconfService.java;h=848f2c48ab10e2fb12ea4ca9c67481a5f65b6528;hb=c61d22e4dc73fdaba09aa8c0b189ea7459679e03;hp=60a8f285a2cc17188dcd4ea1cbb25055bb171a81;hpb=91d7c1ee52322acad08e9f81228ac36b3aa684f5;p=controller.git
diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java
index 60a8f285a2..848f2c48ab 100644
--- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java
+++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfService.java
@@ -9,6 +9,7 @@ package org.opendaylight.controller.sal.rest.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
@@ -23,33 +24,28 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
/**
* The URI hierarchy for the RESTCONF resources consists of an entry
- * point container, 3 top-level resources, and 1 field. Refer to
- * Section 5 for details on each URI.
- *
+ * point container, 4 top-level resources, and 1 field.
+ *
* - /restconf - {@link #getRoot()}
- *
- /config
- *
- /operational - {@link #readAllData()} - Added in Draft02
- *
- /datastore - {@link #readAllData()}
- *
- * - /(top-level-data-nodes) (config=true or false)
- *
- * - /modules
- *
- /module
- *
- /name
- *
- /revision
- *
- /namespace
- *
- /feature
- *
- /deviation
- *
- * - /operations
- *
- * - /(custom protocol operations)
- *
- * - /version (field)
+ *
+ * - /config - {@link #readConfigurationData(String)}
+ * {@link #updateConfigurationData(String, CompositeNode)}
+ * {@link #createConfigurationData(CompositeNode)}
+ * {@link #createConfigurationData(String, CompositeNode)}
+ * {@link #deleteConfigurationData(String)}
+ *
- /operational - {@link #readOperationalData(String)}
+ *
- /modules - {@link #getModules()}
+ *
+ *
- /operations - {@link #invokeRpc(String, CompositeNode)}
+ * {@link #invokeRpc(String, CompositeNode)}
+ *
- /version (field)
*
+ *
*/
@Path("/")
-public interface RestconfService extends RestconfServiceLegacy {
+public interface RestconfService {
public static final String XML = "+xml";
public static final String JSON = "+json";
@@ -59,26 +55,25 @@ public interface RestconfService extends RestconfServiceLegacy {
@GET
@Path("/modules")
- @Produces({Draft01.MediaTypes.API+JSON,Draft01.MediaTypes.API+XML,
- Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML})
+ @Produces({Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML})
public StructuredData getModules();
@POST
@Path("/operations/{identifier}")
- @Produces({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
- Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML,
+ @Produces({Draft02.MediaTypes.OPERATION+JSON, Draft02.MediaTypes.OPERATION+XML,
+ Draft02.MediaTypes.DATA+JSON, Draft02.MediaTypes.DATA+XML,
MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
- @Consumes({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
- Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML,
+ @Consumes({Draft02.MediaTypes.OPERATION+JSON, Draft02.MediaTypes.OPERATION+XML,
+ Draft02.MediaTypes.DATA+JSON, Draft02.MediaTypes.DATA+XML,
MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
public StructuredData invokeRpc(@PathParam("identifier") String identifier, CompositeNode payload);
@POST
@Path("/operations/{identifier}")
- @Produces({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
- Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML,
+ @Produces({Draft02.MediaTypes.OPERATION+JSON, Draft02.MediaTypes.OPERATION+XML,
+ Draft02.MediaTypes.DATA+JSON, Draft02.MediaTypes.DATA+XML,
MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
- public StructuredData invokeRpc(@PathParam("identifier") String identifier);
+ public StructuredData invokeRpc(@PathParam("identifier") String identifier, @DefaultValue("") String noPayload);
@GET
@Path("/config/{identifier:.+}")