X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fnorthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronFloatingIPsNorthbound.java;fp=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fnorthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronFloatingIPsNorthbound.java;h=812a09a0a6951aac5414a69d45b82db209ba94f1;hp=af7cfd18b98376cd712b8a747f37c62d1a1e476d;hb=b1ad203b32b73fc06a856cdfae243986c8037617;hpb=13bc7fa54d688d59131c462c731fe6d0f59d83ec diff --git a/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFloatingIPsNorthbound.java b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFloatingIPsNorthbound.java index af7cfd18b9..812a09a0a6 100644 --- a/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFloatingIPsNorthbound.java +++ b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFloatingIPsNorthbound.java @@ -11,6 +11,7 @@ package org.opendaylight.controller.networkconfig.neutron.northbound; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -36,12 +37,6 @@ import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork; import org.opendaylight.controller.networkconfig.neutron.NeutronPort; import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet; import org.opendaylight.controller.networkconfig.neutron.Neutron_IPs; -import org.opendaylight.controller.northbound.commons.RestMessages; -import org.opendaylight.controller.northbound.commons.exception.BadRequestException; -import org.opendaylight.controller.northbound.commons.exception.ResourceConflictException; -import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException; -import org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException; -import org.opendaylight.controller.sal.utils.ServiceHelper; /** * Neutron Northbound REST APIs.
@@ -245,7 +240,7 @@ public class NeutronFloatingIPsNorthbound { throw new ResourceConflictException("fixed IP is in use."); singleton.setFixedIPAddress(fixedIP); } - Object[] instances = ServiceHelper.getGlobalInstances(INeutronFloatingIPAware.class, this, null); + Object[] instances = NeutronUtil.getInstances(INeutronFloatingIPAware.class, this); if (instances != null) { for (Object instance : instances) { INeutronFloatingIPAware service = (INeutronFloatingIPAware) instance; @@ -366,7 +361,7 @@ public class NeutronFloatingIPsNorthbound { singleton.setFixedIPAddress(fixedIP); } NeutronFloatingIP target = floatingIPInterface.getFloatingIP(floatingipUUID); - Object[] instances = ServiceHelper.getGlobalInstances(INeutronFloatingIPAware.class, this, null); + Object[] instances = NeutronUtil.getInstances(INeutronFloatingIPAware.class, this); if (instances != null) { for (Object instance : instances) { INeutronFloatingIPAware service = (INeutronFloatingIPAware) instance; @@ -409,7 +404,7 @@ public class NeutronFloatingIPsNorthbound { throw new ResourceNotFoundException("Floating IP UUID doesn't exist."); // TODO: need to undo port association if it exists NeutronFloatingIP singleton = floatingIPInterface.getFloatingIP(floatingipUUID); - Object[] instances = ServiceHelper.getGlobalInstances(INeutronFloatingIPAware.class, this, null); + Object[] instances = NeutronUtil.getInstances(INeutronFloatingIPAware.class, this); if (instances != null) { for (Object instance : instances) { INeutronFloatingIPAware service = (INeutronFloatingIPAware) instance;