X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fnorthbound%2Fsubnets%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsubnets%2Fnorthbound%2FSubnetsNorthbound.java;h=50024fd7392706bcf2f935685dfa97ec68a11100;hb=74c92401812b8e77e8ceade6e8714d0fc1c35d3a;hp=a5e805d396934ec719eb18086e069a25d7326788;hpb=04187bee472c35e1f200bff6ef0daeb5163d36fa;p=controller.git diff --git a/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthbound.java b/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthbound.java index a5e805d396..50024fd739 100644 --- a/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthbound.java +++ b/opendaylight/northbound/subnets/src/main/java/org/opendaylight/controller/subnets/northbound/SubnetsNorthbound.java @@ -254,7 +254,7 @@ public class SubnetsNorthbound { @ResponseCode(code = 503, condition = "Service unavailable") }) public Response addSubnet(@PathParam("containerName") String containerName, @PathParam("subnetName") String subnetName, - @TypeHint(SubnetConfig.class) JAXBElement subnetConfigData) { + @TypeHint(SubnetConfig.class) SubnetConfig subnetConfigData) { handleContainerDoesNotExist(containerName); @@ -262,7 +262,7 @@ public class SubnetsNorthbound { throw new UnauthorizedException("User is not authorized to perform this operation on container " + containerName); } - SubnetConfig cfgObject = subnetConfigData.getValue(); + SubnetConfig cfgObject = subnetConfigData; handleNameMismatch(cfgObject.getName(), subnetName); ISwitchManager switchManager = (ISwitchManager) ServiceHelper.getInstance(ISwitchManager.class, containerName, this); @@ -377,7 +377,7 @@ public class SubnetsNorthbound { @ResponseCode(code = 503, condition = "Service unavailable") }) public Response modifySubnet(@PathParam("containerName") String containerName, @PathParam("subnetName") String subnetName, - @TypeHint(SubnetConfig.class) JAXBElement subnetConfigData) { + @TypeHint(SubnetConfig.class) SubnetConfig subnetConfigData) { handleContainerDoesNotExist(containerName); @@ -385,7 +385,7 @@ public class SubnetsNorthbound { throw new UnauthorizedException("User is not authorized to perform this operation on container " + containerName); } - handleNameMismatch(subnetConfigData.getValue().getName(), subnetName); + handleNameMismatch(subnetConfigData.getName(), subnetName); ISwitchManager switchManager = (ISwitchManager) ServiceHelper.getInstance(ISwitchManager.class, containerName, this); @@ -393,7 +393,7 @@ public class SubnetsNorthbound { throw new ServiceUnavailableException("SwitchManager " + RestMessages.SERVICEUNAVAILABLE.toString()); } - SubnetConfig subnetConf = subnetConfigData.getValue(); + SubnetConfig subnetConf = subnetConfigData; SubnetConfig existingConf = switchManager.getSubnetConfig(subnetName); boolean successful = true; @@ -488,7 +488,7 @@ public class SubnetsNorthbound { @ResponseCode(code = 503, condition = "Service unavailable") }) public Response addNodePorts(@PathParam("containerName") String containerName, @PathParam("subnetName") String subnetName, - @TypeHint(SubnetConfig.class) JAXBElement subnetConfigData) { + @TypeHint(SubnetConfig.class) SubnetConfig subnetConfigData) { handleContainerDoesNotExist(containerName); @@ -496,9 +496,9 @@ public class SubnetsNorthbound { throw new UnauthorizedException("User is not authorized to perform this operation on container " + containerName); } - handleNameMismatch(subnetConfigData.getValue().getName(), subnetName); + handleNameMismatch(subnetConfigData.getName(), subnetName); - SubnetConfig subnetConf = subnetConfigData.getValue(); + SubnetConfig subnetConf = subnetConfigData; ISwitchManager switchManager = (ISwitchManager) ServiceHelper.getInstance(ISwitchManager.class, containerName, this); @@ -586,7 +586,7 @@ public class SubnetsNorthbound { @ResponseCode(code = 503, condition = "Service unavailable") }) public Response deleteNodePorts(@PathParam("containerName") String containerName, @PathParam("subnetName") String subnetName, - @TypeHint(SubnetConfig.class) JAXBElement subnetConfigData) { + @TypeHint(SubnetConfig.class) SubnetConfig subnetConfigData) { handleContainerDoesNotExist(containerName); @@ -594,9 +594,9 @@ public class SubnetsNorthbound { throw new UnauthorizedException("User is not authorized to perform this operation on container " + containerName); } - handleNameMismatch(subnetConfigData.getValue().getName(), subnetName); + handleNameMismatch(subnetConfigData.getName(), subnetName); - SubnetConfig subnetConf = subnetConfigData.getValue(); + SubnetConfig subnetConf = subnetConfigData; if (subnetConf.getNodePorts() == null || subnetConf.getNodePorts().isEmpty()) { throw new BadRequestException(RestMessages.INVALIDDATA.toString() + " : invalid node ports");