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=cef5df9e579fb5c8142ca186364044c591421a91;hb=94d0d20b41d64bb6696c2a573ec367fcfddc44e9;hp=848f2c48ab10e2fb12ea4ca9c67481a5f65b6528;hpb=31ea7166f7cf572b3d2c51e2749bb94e8f8af821;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 848f2c48ab..cef5df9e57 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 @@ -16,8 +16,10 @@ import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; import org.opendaylight.controller.sal.restconf.impl.StructuredData; import org.opendaylight.yangtools.yang.data.api.CompositeNode; @@ -55,11 +57,36 @@ public interface RestconfService { @GET @Path("/modules") - @Produces({Draft02.MediaTypes.API+JSON,Draft02.MediaTypes.API+XML}) + @Produces({Draft02.MediaTypes.API+XML, Draft02.MediaTypes.API+JSON, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public StructuredData getModules(); + @GET + @Path("/modules/{identifier:.+}") + @Produces({Draft02.MediaTypes.API+XML, Draft02.MediaTypes.API+JSON, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public StructuredData getModules(@PathParam("identifier") String identifier); + + @GET + @Path("/modules/module/{identifier:.+}") + @Produces({Draft02.MediaTypes.API+XML, Draft02.MediaTypes.API+JSON, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public StructuredData getModule(@PathParam("identifier") String identifier); + + @GET + @Path("/operations") + @Produces({Draft02.MediaTypes.API+XML, Draft02.MediaTypes.API+JSON, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public StructuredData getOperations(); + + @GET + @Path("/operations/{identifier:.+}") + @Produces({Draft02.MediaTypes.API+XML, Draft02.MediaTypes.API+JSON, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public StructuredData getOperations(@PathParam("identifier") String identifier); + @POST - @Path("/operations/{identifier}") + @Path("/operations/{identifier:.+}") @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}) @@ -69,7 +96,7 @@ public interface RestconfService { public StructuredData invokeRpc(@PathParam("identifier") String identifier, CompositeNode payload); @POST - @Path("/operations/{identifier}") + @Path("/operations/{identifier:.+}") @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}) @@ -109,4 +136,8 @@ public interface RestconfService { @Path("/config/{identifier:.+}") public Response deleteConfigurationData(@PathParam("identifier") String identifier); + @GET + @Path("/streams/stream/{identifier:.+}") + public Response subscribeToStream(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); + }