Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "MD-SAL Statistics Manager -Added group-id to group-statistics API"
[controller.git]
/
opendaylight
/
md-sal
/
sal-rest-connector
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
rest
/
api
/
RestconfService.java
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 b8cb2292542b8da4ecf7f8573d6b578a47ff3810..a22ea623975049cd3bd37c8af3103fecce4317e4 100644
(file)
--- 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
@@
-15,6
+15,7
@@
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
import org.opendaylight.controller.sal.restconf.impl.StructuredData;
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
import org.opendaylight.controller.sal.restconf.impl.StructuredData;
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
@@
-25,7
+26,9
@@
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
* Section 5 for details on each URI.
* <ul>
* <li><b>/restconf</b> - {@link #getRoot()}
* Section 5 for details on each URI.
* <ul>
* <li><b>/restconf</b> - {@link #getRoot()}
- * <ul><li><b>/datastore</b> - {@link #readAllData()}
+ * <ul><li><b>/config</b>
+ * <li><b>/operational</b> - {@link #readAllData()} - Added in Draft02
+ * <li><b>/datastore</b> - {@link #readAllData()}
* <ul>
* <li>/(top-level-data-nodes) (config=true or false)
* </ul>
* <ul>
* <li>/(top-level-data-nodes) (config=true or false)
* </ul>
@@
-45,7
+48,7
@@
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
* </ul>
*/
@Path("/")
* </ul>
*/
@Path("/")
-public interface RestconfService {
+public interface RestconfService
extends RestconfServiceLegacy
{
public static final String XML = "+xml";
public static final String JSON = "+json";
public static final String XML = "+xml";
public static final String JSON = "+json";
@@
-54,32
+57,43
@@
public interface RestconfService {
public Object getRoot();
@GET
public Object getRoot();
@GET
- @Path("/
datastore
")
+ @Path("/
modules
")
@Produces({API+JSON,API+XML})
@Produces({API+JSON,API+XML})
- public
Object readAllData
();
+ public
StructuredData getModules
();
+ @POST
+ @Path("/operations/{identifier}")
+ @Produces({Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML,API+JSON,API+XML})
+ public StructuredData invokeRpc(@PathParam("identifier") String identifier, CompositeNode payload);
+
@GET
@GET
- @Path("/
datastore
/{identifier:.+}")
- @Produces({
API+JSON,API
+XML})
- public StructuredData readData(@PathParam("identifier") String identifier);
-
+ @Path("/
config
/{identifier:.+}")
+ @Produces({
Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA
+XML})
+ public StructuredData read
Configuration
Data(@PathParam("identifier") String identifier);
+
@PUT
@PUT
- @Path("/
datastore
/{identifier:.+}")
+ @Path("/
config
/{identifier:.+}")
@Produces({API+JSON,API+XML})
@Produces({API+JSON,API+XML})
- public
Object
createConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload);
+ public
Response
createConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload);
@POST
@POST
- @Path("/
datastore
/{identifier:.+}")
+ @Path("/
config
/{identifier:.+}")
@Produces({API+JSON,API+XML})
@Produces({API+JSON,API+XML})
- public
Object
updateConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload);
+ public
Response
updateConfigurationData(@PathParam("identifier") String identifier, CompositeNode payload);
@GET
@GET
- @Path("/modules")
+ @Path("/operational/{identifier:.+}")
+ @Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML})
+ public StructuredData readOperationalData(@PathParam("identifier") String identifier);
+
+ @PUT
+ @Path("/operational/{identifier:.+}")
@Produces({API+JSON,API+XML})
@Produces({API+JSON,API+XML})
- public
Object getModules(
);
+ public
Response createOperationalData(@PathParam("identifier") String identifier, CompositeNode payload
);
@POST
@POST
- @Path("/operation
s/{identifier
}")
+ @Path("/operation
al/{identifier:.+
}")
@Produces({API+JSON,API+XML})
@Produces({API+JSON,API+XML})
- public StructuredData invokeRpc(@PathParam("identifier") String identifier, CompositeNode payload);
+ public Response updateOperationalData(@PathParam("identifier") String identifier, CompositeNode payload);
+
}
}