X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fsubnets%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsubnets%2Fnorthbound%2FSubnetsNorthboundJAXRS.java;fp=opendaylight%2Fnorthbound%2Fsubnets%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsubnets%2Fnorthbound%2FSubnetsNorthboundJAXRS.java;h=5c327c4f72243b0cd9af6ddb92b1b747630bdca2;hp=05bb5b1dd938ff9208eb5fcda84c6d262e50be33;hb=541d0a36997f292bb037a2199463431eee538358;hpb=fad07e38e57f1c0d8d687e3bae01532196d6e99d diff --git a/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthboundJAXRS.java b/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthboundJAXRS.java index 05bb5b1dd9..5c327c4f72 100644 --- a/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthboundJAXRS.java +++ b/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthboundJAXRS.java @@ -55,10 +55,10 @@ public class SubnetsNorthboundJAXRS { /** * List all the subnets in a given container - * + * * @param containerName * container in which we want to query the subnets - * + * * @return a List of SubnetConfig */ @Path("/{containerName}") @@ -86,12 +86,12 @@ public class SubnetsNorthboundJAXRS { /** * List the configuration of a subnet in a given container - * + * * @param containerName * container in which we want to query the subnet * @param subnetName * of the subnet being queried - * + * * @return a SubnetConfig */ @Path("/{containerName}/{subnetName}") @@ -129,7 +129,7 @@ public class SubnetsNorthboundJAXRS { /** * Add/Update a subnet to a container - * + * * @param containerName * container in which we want to add/update the subnet * @param subnetName @@ -137,7 +137,7 @@ public class SubnetsNorthboundJAXRS { * @param subnet * pair default gateway IP/mask that identify the subnet being * added modified - * + * */ @Path("/{containerName}/{subnetName}") @POST @@ -183,12 +183,12 @@ public class SubnetsNorthboundJAXRS { /** * Delete a subnet from a container - * + * * @param containerName * container in which we want to delete the subnet by name * @param subnetName * of the subnet to be remove. - * + * */ @Path("/{containerName}/{subnetName}") @DELETE @@ -225,56 +225,56 @@ public class SubnetsNorthboundJAXRS { } /* - * + * * Add or remove switch ports to a subnet POST subnets/green/sw - * + * * @param model - * + * * @param containerName - * + * * @param name - * + * * @param subnet: the subnet name name - * + * * @param switchports: datapath ID/port list => * xx:xx:xx:xx:xx:xx:xx:xx/a,b,c-m,r-t,y - * + * * @return - * + * * @RequestMapping(value = "/{containerName}/{name}", method = * RequestMethod.POST) - * + * * public View addSwitchports(Map model, - * + * * @PathVariable(value = "containerName") String containerName, - * + * * @PathVariable(value = "name") String name, - * + * * @RequestParam(value = "nodeports") String nodePorts, - * + * * @RequestParam(value = "action") String action) { - * + * * checkDefaultDisabled(containerName); ISwitchManager switchManager = null; * try { BundleContext bCtx = FrameworkUtil.getBundle(this.getClass()) * .getBundleContext(); - * + * * ServiceReference[] services = bCtx.getServiceReferences( * ISwitchManager.class.getName(), "(containerName=" + containerName + ")"); - * + * * if (services != null) { switchManager = (ISwitchManager) * bCtx.getService(services[0]); logger.debug("Switch manager reference is:" * + switchManager); } } catch (Exception e) { * logger.error("Switch Manager reference is NULL"); } - * + * * checkContainerExists(switchManager); - * + * * String ret; if (action.equals("add")) { ret = * switchManager.addPortsToSubnet(name, nodePorts); } else if * (action.equals("remove")) { ret = * switchManager.removePortsFromSubnet(name, nodePorts); } else { throw new * UnsupportedMediaTypeException(RestMessages.UNKNOWNACTION .toString() + * ": " + action); } - * + * * return returnViewOrThrowConflicEx(model, ret); } */ }