import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
-import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
-import javax.xml.bind.JAXBElement;
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
+import org.opendaylight.controller.containermanager.ContainerConfig;
+import org.opendaylight.controller.containermanager.ContainerFlowConfig;
import org.opendaylight.controller.containermanager.IContainerAuthorization;
+import org.opendaylight.controller.containermanager.IContainerManager;
import org.opendaylight.controller.northbound.commons.RestMessages;
import org.opendaylight.controller.northbound.commons.exception.BadRequestException;
import org.opendaylight.controller.northbound.commons.exception.InternalServerErrorException;
import org.opendaylight.controller.sal.utils.Status;
import org.opendaylight.controller.usermanager.IUserManager;
-import org.opendaylight.controller.containermanager.ContainerFlowConfig;
-import org.opendaylight.controller.containermanager.IContainerManager;
-import org.opendaylight.controller.containermanager.ContainerConfig;
-
/**
* Container Manager Northbound API
*
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/containers
*
- * Response Payload in XML:
+ * Response body in XML:
* <container-config-list>
*    <container-config>
*       <container>black</container>
*     </container-config>
* </container-config-list>
*
- * Response Payload in JSON:
- * { "container-config" : [ { "container" : "black", "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|23@OF|00:00:00:00:00:00:20:21"], "staticVlan" : "10", "flowSpecs : [{ "name": "udp", "protocol": "UDP" }] } ] }
- * { "container-config" : [ { "container" : "red", "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|23@OF|00:00:00:00:00:00:20:21"], "staticVlan" : "20", "flowSpecs": [{ "name": "tcp", "protocol": "TCP" }] } ] }
- *
+ * Response body in JSON:
+ * { "container-config" : [
+ * { "container" : "black",
+ * "nodeConnectors" : [
+ * "OF|1@OF|00:00:00:00:00:00:00:01", "OF|23@OF|00:00:00:00:00:00:20:21"
+ * ],
+ * "staticVlan" : "10",
+ * "flowSpecs : [
+ * { "name": "udp",
+ * "protocol": "UDP" }
+ * ]
+ * },
+ * { "container" : "red",
+ * "nodeConnectors" : [
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|23@OF|00:00:00:00:00:00:20:21"
+ * ],
+ * "staticVlan" : "20",
+ * "flowSpecs": [
+ * { "name": "tcp",
+ * "protocol": "TCP"
+ * }
+ * ]
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/containers")
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/blue
*
- * Response Payload in XML:
+ * Response body in XML:
* <container-config>
*     <container>blue</container>
*     <staticVlan>10</staticVlan>
*     <nodeConnectors>OF|23@OF|00:00:00:00:00:00:20:21</nodeConnectors>
* </container-config>
*
- * Response Payload in JSON:
- * { "container" : "blue", "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|23@OF|00:00:00:00:00:00:20:21"], "staticVlan" : "10" }
- *
+ * Response body in JSON:
+ * {
+ * "container-config": [
+ * {
+ * "container": "yellow",
+ * "staticVlan": "10",
+ * "nodeConnectors": [
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|2@OF|00:00:00:00:00:00:00:02"
+ * ],
+ * "flowSpecs": []
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/container/{container}")
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/yellow
*
- * Request Payload in XML:
+ * Request body in XML:
* <container-config>
*     <container>yellow</container>
*     <staticVlan>10</staticVlan>
*     <nodeConnectors></nodeConnectors>
* </container-config>
*
- * Request Payload in JSON:
- * { "container" : "yellow", "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|23@OF|00:00:00:00:00:00:20:21"], "staticVlan" : "10"}
+ * Request body in JSON:
+ * {
+ * "container" : "yellow",
+ * "nodeConnectors" : [
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|23@OF|00:00:00:00:00:00:20:21"
+ * ],
+ * "staticVlan" : "10"
+ * }
*
* </pre>
*/
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/green/flowspec/ssh
*
- * Response Payload in XML:
- * <container-flowconfig>
+ * Response body in XML:
+ * <flow-spec-config>
*     <name>ssh</name>
*     <nwSrc>10.0.0.101</nwSrc>
*     <nwDst>10.0.0.102</nwDst>
*     <protocol>IPv4</protocol>
*     <tpSrc>80</tpSrc>
*     <tpDst>100</tpDst>
- * </container-flowconfig>
- *
- * Response Payload in JSON:
- * { "protocol" : "IPv4", "nwDst" : "10.0.0.102", "name" : "ssh", "nwSrc" : "10.0.0.101", "tpSrc" : "80", "tpDst" : "100" }
+ * </flow-spec-config>
+ *
+ * Response body in JSON:
+ * {
+ * "protocol" : "IPv4",
+ * "nwDst" : "10.0.0.102",
+ * "name" : "ssh",
+ * "nwSrc" : "10.0.0.101",
+ * "tpSrc" : "80",
+ * "tpDst" : "100"
+ * }
*
* </pre>
*/
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/red/flowspec
*
- * Response Payload in XML:
- * <container-flowconfigs>
- *     <container-flowconfig>
+ * Response body in XML:
+ * <flow-spec-configs>
+ *     <flow-spec-config>
*       <name>ssh</name>
*       <nwSrc>10.0.0.101</nwSrc>
*       <nwDst>10.0.0.102</nwDst>
*       <protocol>IPv4</protocol>
*       <tpSrc>23</tpSrc>
*       <tpDst>100</tpDst>
- *     </container-flowconfig>
- *     <container-flowconfig>
+ *     </flow-spec-config>
+ *     <flow-spec-config>
*       <name>http2</name>
*       <nwSrc>10.0.0.201</nwSrc>
*       <nwDst>10.0.0.202</nwDst>
*       <protocol></protocol>
*       <tpSrc>80</tpSrc>
*       <tpDst>100</tpDst>
- *     </container-flowconfig>
- * </container-flowconfigs>
- *
- * Response Payload in JSON:
- * { "protocol" : "IPv4", "nwDst" : "10.0.0.102", "name" : "ssh" , "nwSrc" : "10.0.0.101", "tpSrc" : "23", "tpDst" : "100" }
- * { "protocol" : "", "nwDst" : "10.0.0.202", "name" : "http" , "nwSrc" : "10.0.0.201", "tpSrc" : "80", "tpDst" : "100" }
+ *     </flow-spec-config>
+ * </flow-spec-configs>
+ *
+ * Response body in JSON:
+ * {
+ * "flow-spec-config": [
+ * {
+ * "name": "http",
+ * "nwSrc": "10.0.0.201",
+ * "nwDst": "10.0.0.202",
+ * "protocol": "",
+ * "tpSrc": "80",
+ * "tpDst": "100"
+ * },
+ * {
+ * "name": "ssh",
+ * "nwSrc": "10.0.0.101",
+ * "nwDst": "10.0.0.102",
+ * "protocol": "IPv4",
+ * "tpSrc": "23",
+ * "tpDst": "100"
+ * }
+ * ]
+ * }
*
* </pre>
*/
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/purple/flowspec/http
*
- * Request Payload in XML:
- * <container-flowconfig>
+ * Request body in XML:
+ * <flow-spec-config>
*     <name>http</name>
*     <nwSrc>10.0.0.101</nwSrc>
*     <nwDst>10.0.0.102</nwDst>
*     <protocol></protocol>
*     <tpSrc>80</tpSrc>
*     <tpDst>100</tpDst>
- * </container-flowconfig>
- *
- * Request Payload in JSON:
- * { "protocol" : "", "nwDst" : "10.0.0.102", "name" : "http", "nwSrc" : "10.0.0.101", "tpSrc" : "80", "tpDst" : "100" }
+ * </flow-spec-config>
+ *
+ * Request body in JSON:
+ * {
+ * "protocol" : "",
+ * "nwDst" : "10.0.0.102",
+ * "name" : "http",
+ * "nwSrc" : "10.0.0.101",
+ * "tpSrc" : "80",
+ * "tpDst" : "100"
+ * }
*
* </pre>
*/
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/green/nodeconnector
*
- * Request Payload in XML:
- * <list>
+ * Request body in XML:
+ * <nodeConnectors>
* <nodeConnectors>OF|1@OF|00:00:00:00:00:00:00:01</nodeConnectors>
* <nodeConnectors>OF|2@OF|00:00:00:00:00:00:00:01</nodeConnectors>
* <nodeConnectors>OF|3@OF|00:00:00:00:00:00:00:22</nodeConnectors>
* <nodeConnectors>OF|4@OF|00:00:00:00:00:00:00:22</nodeConnectors>
- * </list>
- *
- * Request Payload in JSON:
- * { "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|2@OF|00:00:00:00:00:00:00:01", "OF|3@OF|00:00:00:00:00:00:00:22", "OF|4@OF|00:00:00:00:00:00:00:22" }
+ * </nodeConnectors>
+ *
+ * Request body in JSON:
+ * {
+ * "nodeConnectors" : [
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|2@OF|00:00:00:00:00:00:00:01",
+ * "OF|3@OF|00:00:00:00:00:00:00:22",
+ * "OF|4@OF|00:00:00:00:00:00:00:22"
+ * ]
+ * }
*
* </pre>
*/
* Request URL:
* http://localhost:8080/controller/nb/v2/containermanager/container/red/nodeconnector
*
- * Request Payload in XML:
- * <list>
+ * Request body in XML:
+ * <nodeConnectors>
* <nodeConnectors>OF|1@OF|00:00:00:00:00:00:00:01</nodeConnectors>
* <nodeConnectors>OF|2@OF|00:00:00:00:00:00:00:01</nodeConnectors>
* <nodeConnectors>OF|3@OF|00:00:00:00:00:00:00:22</nodeConnectors>
* <nodeConnectors>OF|4@OF|00:00:00:00:00:00:00:22</nodeConnectors>
- * </list>
- *
- * Request Payload in JSON:
- * { "nodeConnectors" : ["OF|1@OF|00:00:00:00:00:00:00:01", "OF|2@OF|00:00:00:00:00:00:00:01", "OF|3@OF|00:00:00:00:00:00:00:22", "OF|4@OF|00:00:00:00:00:00:00:22" }
+ * </nodeConnectors>
+ *
+ * Request body in JSON:
+ * {
+ * "nodeConnectors" : [
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|2@OF|00:00:00:00:00:00:00:01",
+ * "OF|3@OF|00:00:00:00:00:00:00:22",
+ * "OF|4@OF|00:00:00:00:00:00:00:22"
+ * ]
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/flowprogrammer/default
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
*    <flowConfig>
*    </flowConfig>
* </list>
*
- * Response in JSON:
- * {"flowConfig":{"installInHw":"true","name":"flow1","node":{"id":"00:00:00:00:00:00:00:01","type":"OF"},
- * "ingressPort":"1","priority":"500","etherType":"0x800","nwSrc":"9.9.1.1","actions":"OUTPUT=2"}}
- *
+ * Response body in JSON:
+ * {
+ * "flowConfig": [
+ * {
+ * "installInHw": "true",
+ * "name": "flow1",
+ * "node": {
+ * "type": "OF",
+ * "id": "00:00:00:00:00:00:00:01"
+ * },
+ * "ingressPort": "1",
+ * "priority": "500",
+ * "etherType": "0x800",
+ * "nwSrc":"9.9.1.1",
+ * "actions": [
+ * "OUTPUT=2"
+ * ]
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/{containerName}")
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
*    <flowConfig>
*    </flowConfig>
* </list>
*
- * Response in JSON:
- * {"flowConfig":{"installInHw":"true","name":"flow1","node":{"id":"00:00:00:00:00:00:00:01","type":"OF"},
- * "ingressPort":"1","priority":"500","etherType":"0x800","nwSrc":"9.9.1.1","actions":"OUTPUT=2"}}
- *
+ * Response body in JSON:
+ * {
+ * "flowConfig": [
+ * {
+ * "installInHw": "true",
+ * "name": "flow1",
+ * "node": {
+ * "type": "OF",
+ * "id": "00:00:00:00:00:00:00:01"
+ * },
+ * "ingressPort": "1",
+ * "priority": "500",
+ * "etherType": "0x800",
+ * "nwSrc":"9.9.1.1",
+ * "actions": [
+ * "OUTPUT=2"
+ * ]
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/{containerName}/node/{nodeType}/{nodeId}")
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/staticFlow/flow1
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <flowConfig>
*    <installInHw>true</installInHw>
*    <actions>OUTPUT=2</actions>
* </flowConfig>
*
- * Response in JSON:
- * {"installInHw":"true","name":"flow1","node":{"id":"00:00:00:00:00:00:00:01","type":"OF"},
- * "ingressPort":"1","priority":"500","etherType":"0x800","nwSrc":"9.9.1.1","actions":"OUTPUT=2"}
+ * Response body in JSON:
+ * {
+ * "installInHw":"true",
+ * "name":"flow1",
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:01",
+ * "type":"OF"
+ * },
+ * "ingressPort":"1",
+ * "priority":"500",
+ * "etherType":"0x800",
+ * "nwSrc":"9.9.1.1",
+ * "actions":[
+ * "OUTPUT=2"
+ * ]
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/staticFlow/flow1
*
- * Request in XML:
+ * Request body in XML:
* <flowConfig>
*    <installInHw>true</installInHw>
*    <name>flow1</name>
*    <actions>OUTPUT=2</actions>
* </flowConfig>
*
- * Request in JSON:
- * {"installInHw":"true","name":"flow1","node":{"id":"00:00:00:00:00:00:00:01","type":"OF"},
- * "ingressPort":"1","priority":"500","etherType":"0x800","nwSrc":"9.9.1.1","actions":"OUTPUT=2"}
- *
+ * Request body in JSON:
+ * {
+ * "installInHw":"true",
+ * "name":"flow1",
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:01",
+ * "type":"OF"
+ * },
+ * "ingressPort":"1",
+ * "priority":"500",
+ * "etherType":"0x800",
+ * "nwSrc":"9.9.1.1",
+ * "actions":[
+ * "OUTPUT=2"
+ * ]
+ * }
* </pre>
*/
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
-import javax.xml.bind.JAXBElement;
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
*
* Example:
*
- * RequestURL:
- *
+ * Request URL:
* http://localhost:8080/controller/nb/v2/hosttracker/default/hosts/active
*
- * Response in XML
+ * Response body in XML
*
* <list>
*  <hostConfig>
*  </hostConfig>
* </list>
*
- * Response in JSON:
+ * Response body in JSON:
*
* {
*  "hostConfig":[
*
* Example:
*
- * RequestURL:
- *
+ * Request URL:
* http://localhost:8080/controller/nb/v2/hosttracker/default/hosts/inactive
*
- * Response in XML
+ * Response body in XML
*
* <list>
*  <hostConfig>
*  </hostConfig>
* </list>
*
- * Response in JSON:
+ * Response body in JSON:
*
* {
*  "hostConfig":[
*
* Example:
*
- * RequestURL:
- *
+ * Request URL:
* http://localhost:8080/controller/nb/v2/hosttracker/default/address/1.1.1.1
*
- * Response in XML
+ * Response body in XML
*
* <hostConfig>
*  <dataLayerAddress>00:00:00:00:01:01</dataLayerAddress>
*  <staticHost>false</staticHost>
* </hostConfig>
*
- * Response in JSON:
+ * Response body in JSON:
*
* {
*  "dataLayerAddress":"00:00:00:00:01:01",
*
* Example:
*
- * RequestURL:
- *
+ * Request URL:
* http://localhost:8080/controller/nb/v2/hosttracker/default/address/1.1.1.1
*
- * Request in XML
+ * Request body in XML
*
* <hostConfig>
*  <dataLayerAddress>00:00:00:00:01:01</dataLayerAddress>
*  <staticHost>false</staticHost>
* </hostConfig>
*
- * Request in JSON:
+ * Request body in JSON:
*
* {
*  "dataLayerAddress":"00:00:00:00:01:01",
* @param networkAddress
* IP Address
* @return Response as dictated by the HTTP Response code.
+ *
+ * Example:
+ *
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/hosttracker/default/address/1.1.1.1
+ *
*/
@Path("/{containerName}/address/{networkAddress}")
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
-import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
-import javax.xml.bind.JAXBElement;
import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
* HTTP/1.1 200 OK
* Content-Type: application/json
*
- * {"staticRoute":{"name":"route-1","prefix":"10.10.1.0/24","nextHop":"1.1.1.1"}}
+ * { "staticRoute":[
+ * "name":"route-1",
+ * "prefix":"10.10.1.0/24",
+ * "nextHop":"1.1.1.1"
+ * ]
+ * }
*
* </pre>
*
* Example:
*
* Request URL:
- * GET http://localhost:8080/controller/nb/v2/staticroute/default/routes
+ * http://localhost:8080/controller/nb/v2/staticroute/default/routes
*
- * Response in XML:
+ * Response body in XML:
* <list>
* <staticRoute>
* <name>route-1</name>
* </staticRoute>
* </list>
*
- * Response in JSON:
- * {"staticRoute":{"name":"route-1","prefix":"10.10.1.0/24","nextHop":"1.1.1.1"}}
- *
+ * Response body in JSON:
+ * {
+ * "staticRoute": [
+ * {
+ * "name": "route-1",
+ * "prefix": "10.10.1.0/24",
+ * "nextHop": "1.1.1.1"
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/{containerName}/routes")
* Example:
*
* Request URL:
- * GET http://localhost:8080/controller/nb/v2/staticroute/default/route/route-1
+ * http://localhost:8080/controller/nb/v2/staticroute/default/route/route-1
*
- * Response in XML:
+ * Response body in XML:
*
* <staticRoute>
* <name>route-1</name>
* <nextHop>1.1.1.1</nextHop>
* </staticRoute>
*
- * Response in JSON:
- * {"name":"route-1","prefix":"10.10.1.0/24","nextHop":"1.1.1.1"}
+ * Response body in JSON:
+ * {
+ * "name":"route-1",
+ * "prefix":"10.10.1.0/24",
+ * "nextHop":"1.1.1.1"
+ * }
*
* </pre>
*/
* Example:
*
* Request URL:
- * PUT http://localhost:8080/controller/nb/v2/staticroute/default/route/route-1
- *
- * Request payload in JSON:
- * {"name":"route-1","prefix":"10.10.1.0/24","nextHop":"1.1.1.1"}
+ * http://localhost:8080/controller/nb/v2/staticroute/default/route/route-1
*
+ * Request body in XML:
+ * <staticRoute>
+ * <name>route-1</name>
+ * <prefix>10.10.1.0/24</prefix>
+ * <nextHop>1.1.1.1</nextHop>
+ * </staticRoute>
+ * Request body in JSON:
+ * {
+ * "name":"route-1",
+ * "prefix":"10.10.1.0/24",
+ * "nextHop":"1.1.1.1"
+ * }
* </pre>
*/
@Path("/{containerName}/route/{route}")
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/flow
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "flowStatistics": [
* {
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <flowStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/flow/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodeFlowStatistics>
* <node>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/port
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "portStatistics": [
* {
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <portStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/port/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodePortStatistics>
* <node>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/table
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "tableStatistics": [
* {
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <tableStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/table/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodeTableStatistics>
* <node>
*
* @return a List of SubnetConfig
*
- * <pre>
+ * <pre>
* Example:
*
- * Request URL: http://localhost:8080/controller/nb/v2/subnetservice/default/subnets
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/subnetservice/default/subnets
*
- * Response in XML:
+ * Response body in XML:
+ * <list>
* <subnetConfig>
* <name>marketingdepartment</name>
* <subnet>30.31.54.254/24</subnet>
* <subnetConfig>
* <name>salesdepartment</name>
* <subnet>20.18.1.254/16</subnet>
- * <nodeConnectors>0F|11@OF|00:00:00:aa:bb:cc:dd:ee>/nodeConnectors>
- * <nodeConnectors>0F|13@OF|00:00:00:aa:bb:cc:dd:ee>/nodeConnectors>
+ * <nodeConnectors>OF|11@OF|00:00:00:aa:bb:cc:dd:ee</nodeConnectors>
+ * <nodeConnectors>OF|13@OF|00:00:00:aa:bb:cc:dd:ee</nodeConnectors>
* </subnetConfig>
- *
- * Response in JSON:
+ * </list>
+ * Response body in JSON:
* {
- * "name":"marketingdepartment",
- * "subnet":"30.31.54.254/24",
- * }
- * {
- * "name":"salesdepartment",
- * "subnet":"20.18.1.254/16",
- * "nodeConnectors":["0F|11@OF|00:00:00:aa:bb:cc:dd:ee", "0F|13@OF|00:00:00:aa:bb:cc:dd:ee"]
+ * "subnetConfig": [
+ * {
+ * "name": "marketingdepartment",
+ * "subnet": "30.31.54.254/24",
+ * "nodeConnectors": [
+ * "OF|04@OF|00:00:00:00:00:00:00:04",
+ * "OF|07@OF|00:00:00:00:00:00:00:07"
+ * ]
+ * },
+ * {
+ * "name":"salesdepartment",
+ * "subnet":"20.18.1.254/16",
+ * "nodeConnectors": [
+ * "OF|11@OF|00:00:00:aa:bb:cc:dd:ee",
+ * "OF|13@OF|00:00:00:aa:bb:cc:dd:ee"
+ * ]
+ * }
+ * ]
* }
+ *
* </pre>
*/
@Path("/{containerName}/subnets")
* <pre>
* Example:
*
- * Request URL: http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/marketingdepartment
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/marketingdepartment
*
- * Response in XML:
+ * Response body in XML:
* <subnetConfig>
* <name>marketingdepartment</name>
* <subnet>30.0.0.1/24</subnet>
- * <nodeConnectors>0F|1@OF|00:00:11:22:33:44:55:66>/nodePorts>
- * <nodeConnectors>0F|3@OF|00:00:11:22:33:44:55:66>/nodePorts>
+ * <nodeConnectors>OF|1@OF|00:00:00:00:00:00:00:01</nodePorts>
+ * <nodeConnectors>OF|3@OF|00:00:00:00:00:00:00:03</nodePorts>
* </subnetConfig>
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "name":"marketingdepartment",
* "subnet":"30.0.0.1/24",
- * "nodeConnectors":["0F|1@OF|00:00:11:22:33:44:55:66", "0F|3@OF|00:00:11:22:33:44:55:66"]
+ * "nodeConnectors":[
+ * "OF|1@OF|00:00:00:00:00:00:00:01",
+ * "OF|3@OF|00:00:00:00:00:00:00:03"
+ * ]
* }
* </pre>
*/
* <pre>
* Example:
*
- * Request URL: http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/salesdepartment
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/salesdepartment
*
- * Request XML:
+ * Request body in XML:
* <subnetConfig>
* <name>salesdepartment</name>
* <subnet>172.173.174.254/24</subnet>
- * <nodeConnectors>0F|22@OF|00:00:11:22:33:44:55:66>/nodeConnectors>
- * <nodeConnectors>0F|39@OF|00:00:ab:cd:33:44:55:66>/nodeConnectors>
+ * <nodeConnectors>OF|22@OF|00:00:11:22:33:44:55:66</nodeConnectors>
+ * <nodeConnectors>OF|39@OF|00:00:ab:cd:33:44:55:66</nodeConnectors>
* </subnetConfig>
*
- * Request in JSON:
+ * Request body in JSON:
* {
* "name":"salesdepartment",
- * "subnet":"172.173.174.254/24"
- * "nodeConnectors":["0F|22@OF|00:00:11:22:33:44:55:66", "0F|39@OF|00:00:ab:cd:33:44:55:66"]
+ * "subnet":"172.173.174.254/24",
+ * "nodeConnectors":[
+ * "OF|22@OF|00:00:11:22:33:44:55:66",
+ * "OF|39@OF|00:00:ab:cd:33:44:55:66"
+ * ]
* }
* </pre>
*/
* name of new subnet to be deleted
* @return Response as dictated by the HTTP Response Status code
*
- * <pre>
+ * <pre>
* Example:
- * Request URL: http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/engdepartment
+ *
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/engdepartment
*
* </pre>
*/
* <pre>
* Example:
*
- * Request URL: http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/salesdepartment
+ * Request URL:
+ * http://localhost:8080/controller/nb/v2/subnetservice/default/subnet/salesdepartment
*
- * Request in XML:
+ * Request body in XML:
* <subnetConfig>
* <name>salesdepartment</name>
* <subnet>172.173.174.254/24</subnet>
- * <nodeConnectors>0F|22@OF|00:00:11:22:33:44:55:66>/nodeConnectors>
- * <nodeConnectors>0F|39@OF|00:00:ab:cd:33:44:55:66>/nodeConnectors>
+ * <nodeConnectors>OF|22@OF|00:00:11:22:33:44:55:66</nodeConnectors>
+ * <nodeConnectors>OF|39@OF|00:00:ab:cd:33:44:55:66</nodeConnectors>
* </subnetConfig>
*
- * Request in JSON:
+ * Request body in JSON:
* {
* "name":"salesdepartment",
- * "subnet":"172.173.174.254/24"
- * "nodeConnectors":["0F|22@OF|00:00:11:22:33:44:55:66", "0F|39@OF|00:00:ab:cd:33:44:55:66"]
+ * "subnet":"172.173.174.254/24",
+ * "nodeConnectors":[
+ * "OF|22@OF|00:00:11:22:33:44:55:66",
+ * "OF|39@OF|00:00:ab:cd:33:44:55:66"
+ * ]
* }
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/nodes
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
*    <nodeProperties>
*    </nodeProperties>
* </list>
*
- * Response in JSON:
- * {"nodeProperties":[{"node":{"id":"00:00:00:00:00:00:00:02","type":"OF"},"properties":{"tables":{"value":"-1"},
- * "description":{"value":"None"},"actions":{"value":"4095"},"macAddress":{"value":"00:00:00:00:00:02"},"capabilities"
- * :{"value":"199"},"timeStamp":{"value":"1377291227877","name":"connectedSince"},"buffers":{"value":"256"}}}]}
+ * Response body in JSON:
+ * {
+ * "nodeProperties":[
+ * {
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:02",
+ * "type":"OF"
+ * },
+ * "properties":{
+ * "tables":{
+ * "value":"-1"
+ * },
+ * "description":{
+ * "value":"None"
+ * },
+ * "actions":{
+ * "value":"4095"
+ * },
+ * "macAddress":{
+ * "value":"00:00:00:00:00:02"
+ * },
+ * "capabilities":{
+ * "value":"199"
+ * },
+ * "timeStamp":{
+ * "value":"1377291227877",
+ * "name":"connectedSince"
+ * },
+ * "buffers":{
+ * "value":"256"
+ * }
+ * }
+ * }
+ * ]
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/node/OF/00:00:00:00:00:00:00:03/property/description/Switch3
*
* </pre>
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/node/OF/00:00:00:00:00:00:00:03/property/forwarding
*
* </pre>
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/node/OF/00:00:00:00:00:00:00:01
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
*    <nodeConnectorProperties>
*    </nodeConnectorProperties>
* </list>
*
- * Response in JSON:
- * {"nodeConnectorProperties":[{"nodeconnector":{"node":{"id":"00:00:00:00:00:00:00:01","type":"OF"},"id":"2","type":"OF"},
- * "properties":{"state":{"value":"1"},"config":{"value":"1"},"name":{"value":"L1_2-C2_1"}}}]}
+ * Response body in JSON:
+ * {
+ * "nodeConnectorProperties":[
+ * {
+ * "nodeconnector":{
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:01",
+ * "type":"OF"
+ * },
+ * "id":"2",
+ * "type":"OF"
+ * },
+ * "properties":{
+ * "state":{
+ * "value":"1"
+ * },
+ * "config":{
+ * "value":"1"
+ * },
+ * "name":{
+ * "value":"L1_2-C2_1"
+ * }
+ * }
+ * }
+ * ]
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/nodeconnector/OF/00:00:00:00:00:00:00:01/OF/2/property/bandwidth/1
*
* </pre>
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/nodeconnector/OF/00:00:00:00:00:00:00:01/OF/2/property/bandwidth
*
* </pre>
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/switchmanager/default/save
*
* </pre>
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/topology/default
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <topology>
* <edgeProperties>
* </edgeProperties>
* </topology>
*
- * Response in JSON:
- * {"edgeProperties":[{"edge":{"tailNodeConnector":{"node":{"id":"00:00:00:00:00:00:00:02","type":"OF"},
- * "id":"2","type":"OF"},"headNodeConnector":{"node":{"id":"00:00:00:00:00:00:00:51","type":"OF"},"id":
- * "2","type":"OF"}},"properties":{"timeStamp":{"value":"1377278961017","name":"creation"}}},
- * {"edge":{"tailNodeConnector":{"node":{"id":"00:00:00:00:00:00:00:51","type":"OF"},"id":
- * "2","type":"OF"}},"headNodeConnector":{"node":{"id":"00:00:00:00:00:00:00:02","type":"OF"},
- * "id":"2","type":"OF"}},"properties":{"timeStamp":{"value":"1377278961018","name":"creation"}}}]}
- *
+ * Response body in JSON:
+ * {
+ * "edgeProperties":[
+ * {
+ * "edge":{
+ * "tailNodeConnector":{
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:02",
+ * "type":"OF"
+ * },
+ * "id":"2",
+ * "type":"OF"
+ * },
+ * "headNodeConnector":{
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:51",
+ * "type":"OF"
+ * },
+ * "id":"2",
+ * "type":"OF"
+ * }
+ * },
+ * "properties":{
+ * "timeStamp": {
+ * "value": 1379527162648,
+ * "name": "creation",
+ * },
+ * "name": {
+ * "value": "s2-eth3"
+ * },
+ * "state": {
+ * "value": 1
+ * },
+ * "config": {
+ * "value": 1
+ * },
+ * "bandwidth": {
+ * "value": 10000000000
+ * }
+ * }
+ * },
+ * {
+ * "edge":{
+ * "tailNodeConnector":{
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:51",
+ * "type":"OF"
+ * },
+ * "id":"2",
+ * "type":"OF"
+ * },
+ * "headNodeConnector":{
+ * "node":{
+ * "id":"00:00:00:00:00:00:00:02",
+ * "type":"OF"
+ * },
+ * "id":"2",
+ * "type":"OF"
+ * }
+ * },
+ * "properties":{
+ * "timeStamp": {
+ * "value": 1379527162648,
+ * "name": "creation",
+ * }
+ * }
+ * }
+ * ]
+ * }
* </pre>
*/
@Path("/{containerName}")
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/topology/default/userLinks
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- * <topologyUserLinks>
+ * <list>
* <userLinks>
* <status>Success</status>
* <name>link1</name>
* <srcNodeConnector>OF|2@OF|00:00:00:00:00:00:00:02</srcNodeConnector>
* <dstNodeConnector>OF|2@OF|00:00:00:00:00:00:00:51</dstNodeConnector>
* </userLinks>
- * </topologyUserLinks>
+ * </list>
*
- * Response in JSON:
- * {"userLinks":{"status":"Success","name":"link1","srcNodeConnector":
- * "OF|2@OF|00:00:00:00:00:00:00:02","dstNodeConnector":"OF|2@OF|00:00:00:00:00:00:00:51"}}
+ * Response body in JSON:
+ * {
+ * "userLinks": [
+ * {
+ * "status": "Success",
+ * "name": "link1",
+ * "srcNodeConnector": "OF|2@OF|00:00:00:00:00:00:00:02",
+ * "dstNodeConnector": "OF|5@OF|00:00:00:00:00:00:00:05"
+ * }
+ * ]
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/topology/default/userLink/link1
*
- * Request in XML:
+ * Request body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- * <topologyUserLinks>
+ * <topologyUserLinkConfig>
* <status>Success</status>
* <name>link1</name>
* <srcNodeConnector>OF|2@OF|00:00:00:00:00:00:00:02</srcNodeConnector>
* <dstNodeConnector>OF|2@OF|00:00:00:00:00:00:00:51</dstNodeConnector>
- * </topologyUserLinks>
+ * </topologyUserLinkConfig>
*
- * Request in JSON:
- * {"status":"Success","name":"link1","srcNodeConnector":"OF|2@OF|00:00:00:00:00:00:00:02","dstNodeConnector":"OF|2@OF|00:00:00:00:00:00:00:51"}
+ * Request body in JSON:
+ * {
+ * "status":"Success",
+ * "name":"link1",
+ * "srcNodeConnector":"OF|2@OF|00:00:00:00:00:00:00:02",
+ * "dstNodeConnector":"OF|2@OF|00:00:00:00:00:00:00:51"
+ * }
*
* </pre>
*/
*
* Example:
*
- * RequestURL:
+ * Request URL:
* http://localhost:8080/controller/nb/v2/topology/default/userLink/config1
*
* </pre>