X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fnorthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronLoadBalancerPoolNorthbound.java;h=77bb525c84e2d65b40225edcbbd12177113318ce;hb=f7c3c90a9cebe51fcd70857177029f25141933b6;hp=5235030b4f47da59d89582add0ee535be3e67dc5;hpb=687598acd2f6b71397b105e93f6a2d1b21a7c0ef;p=controller.git
diff --git a/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java
index 5235030b4f..77bb525c84 100644
--- a/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java
+++ b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java
@@ -11,18 +11,10 @@
package org.opendaylight.controller.networkconfig.neutron.northbound;
-import org.codehaus.enunciate.jaxrs.ResponseCode;
-import org.codehaus.enunciate.jaxrs.StatusCodes;
-import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolAware;
-import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolCRUD;
-import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;
-import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPool;
-import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPoolMember;
-import org.opendaylight.controller.northbound.commons.RestMessages;
-import org.opendaylight.controller.northbound.commons.exception.BadRequestException;
-import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException;
-import org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException;
-import org.opendaylight.controller.sal.utils.ServiceHelper;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -36,10 +28,13 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
+import org.codehaus.enunciate.jaxrs.ResponseCode;
+import org.codehaus.enunciate.jaxrs.StatusCodes;
+import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolAware;
+import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolCRUD;
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;
+import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPool;
+import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPoolMember;
/**
* Neutron Northbound REST APIs for LoadBalancerPool Policies.
@@ -200,9 +195,8 @@ public class NeutronLoadBalancerPoolNorthbound {
if (loadBalancerPoolInterface.neutronLoadBalancerPoolExists(singleton.getLoadBalancerPoolID())) {
throw new BadRequestException("LoadBalancerPool UUID already exists");
}
- loadBalancerPoolInterface.addNeutronLoadBalancerPool(singleton);
- Object[] instances = ServiceHelper.getGlobalInstances(INeutronLoadBalancerPoolAware.class, this, null);
+ Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolAware.class, this);
if (instances != null) {
for (Object instance : instances) {
INeutronLoadBalancerPoolAware service = (INeutronLoadBalancerPoolAware) instance;
@@ -223,7 +217,7 @@ public class NeutronLoadBalancerPoolNorthbound {
List bulk = input.getBulk();
Iterator i = bulk.iterator();
HashMap testMap = new HashMap();
- Object[] instances = ServiceHelper.getGlobalInstances(INeutronLoadBalancerPoolAware.class, this, null);
+ Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolAware.class, this);
while (i.hasNext()) {
NeutronLoadBalancerPool test = i.next();
@@ -315,7 +309,7 @@ public class NeutronLoadBalancerPoolNorthbound {
throw new BadRequestException("Attribute edit blocked by Neutron");
}
- Object[] instances = ServiceHelper.getGlobalInstances(INeutronLoadBalancerPoolAware.class, this, null);
+ Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolAware.class, this);
if (instances != null) {
for (Object instance : instances) {
INeutronLoadBalancerPoolAware service = (INeutronLoadBalancerPoolAware) instance;
@@ -370,7 +364,7 @@ public class NeutronLoadBalancerPoolNorthbound {
return Response.status(409).build();
}
NeutronLoadBalancerPool singleton = loadBalancerPoolInterface.getNeutronLoadBalancerPool(loadBalancerPoolUUID);
- Object[] instances = ServiceHelper.getGlobalInstances(INeutronLoadBalancerPoolAware.class, this, null);
+ Object[] instances = NeutronUtil.getInstances(INeutronLoadBalancerPoolAware.class, this);
if (instances != null) {
for (Object instance : instances) {
INeutronLoadBalancerPoolAware service = (INeutronLoadBalancerPoolAware) instance;