Remove superfulous class from neutron NB bundle. 18/2218/2
authorRyan Moats <rmoats@us.ibm.com>
Mon, 28 Oct 2013 13:25:24 +0000 (08:25 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 31 Oct 2013 14:42:38 +0000 (14:42 +0000)
Remove superfulous NeutronNBInterfaces class from neutron NB bundle
and refactor other classes to use NeutronCRUDInterfaces methods

Change-Id: I7ecccb220250f0038476aea138cf58801ecb3b24
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFloatingIPsNorthbound.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNBInterfaces.java [deleted file]
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworksNorthbound.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronPortsNorthbound.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronRoutersNorthbound.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetsNorthbound.java

index 6f3ed13..2b0ad45 100644 (file)
@@ -30,6 +30,7 @@ import org.opendaylight.controller.networkconfig.neutron.INeutronFloatingIPCRUD;
 import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetCRUD;\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronFloatingIP;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;\r
@@ -89,7 +90,7 @@ public class NeutronFloatingIPsNorthbound {
             @QueryParam("page_reverse") String pageReverse\r
             // sorting not supported\r
             ) {\r
-        INeutronFloatingIPCRUD floatingIPInterface = NeutronNBInterfaces.getIfNBFloatingIPCRUD("default",this);\r
+        INeutronFloatingIPCRUD floatingIPInterface = NeutronCRUDInterfaces.getINeutronFloatingIPCRUD(this);\r
         if (floatingIPInterface == null) {\r
             throw new ServiceUnavailableException("Floating IP CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -132,7 +133,7 @@ public class NeutronFloatingIPsNorthbound {
             @PathParam("floatingipUUID") String floatingipUUID,\r
             // return fields\r
             @QueryParam("fields") List<String> fields ) {\r
-        INeutronFloatingIPCRUD floatingIPInterface = NeutronNBInterfaces.getIfNBFloatingIPCRUD("default",this);\r
+        INeutronFloatingIPCRUD floatingIPInterface = NeutronCRUDInterfaces.getINeutronFloatingIPCRUD(this);\r
         if (floatingIPInterface == null) {\r
             throw new ServiceUnavailableException("Floating IP CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -162,22 +163,22 @@ public class NeutronFloatingIPsNorthbound {
         @ResponseCode(code = 409, condition = "Conflict"),\r
         @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response createFloatingIPs(final NeutronFloatingIPRequest input) {\r
-        INeutronFloatingIPCRUD floatingIPInterface = NeutronNBInterfaces.getIfNBFloatingIPCRUD("default",this);\r
+        INeutronFloatingIPCRUD floatingIPInterface = NeutronCRUDInterfaces.getINeutronFloatingIPCRUD(this);\r
         if (floatingIPInterface == null) {\r
             throw new ServiceUnavailableException("Floating IP CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default", this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD( this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -281,22 +282,22 @@ public class NeutronFloatingIPsNorthbound {
             @PathParam("floatingipUUID") String floatingipUUID,\r
             NeutronFloatingIPRequest input\r
             ) {\r
-        INeutronFloatingIPCRUD floatingIPInterface = NeutronNBInterfaces.getIfNBFloatingIPCRUD("default",this);\r
+        INeutronFloatingIPCRUD floatingIPInterface = NeutronCRUDInterfaces.getINeutronFloatingIPCRUD(this);\r
         if (floatingIPInterface == null) {\r
             throw new ServiceUnavailableException("Floating IP CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default", this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD( this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -396,7 +397,7 @@ public class NeutronFloatingIPsNorthbound {
             @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response deleteFloatingIP(\r
             @PathParam("floatingipUUID") String floatingipUUID) {\r
-        INeutronFloatingIPCRUD floatingIPInterface = NeutronNBInterfaces.getIfNBFloatingIPCRUD("default",this);\r
+        INeutronFloatingIPCRUD floatingIPInterface = NeutronCRUDInterfaces.getINeutronFloatingIPCRUD(this);\r
         if (floatingIPInterface == null) {\r
             throw new ServiceUnavailableException("Floating IP CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNBInterfaces.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNBInterfaces.java
deleted file mode 100644 (file)
index 730fe2c..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*\r
- * Copyright IBM Corporation, 2013.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.controller.networkconfig.neutron.northbound;\r
-\r
-import java.util.List;\r
-\r
-import org.opendaylight.controller.containermanager.IContainerManager;\r
-import org.opendaylight.controller.networkconfig.neutron.INeutronFloatingIPCRUD;\r
-import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;\r
-import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;\r
-import org.opendaylight.controller.networkconfig.neutron.INeutronRouterCRUD;\r
-import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetCRUD;\r
-import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
-import org.opendaylight.controller.northbound.commons.RestMessages;\r
-import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException;\r
-import org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException;\r
-import org.opendaylight.controller.sal.utils.ServiceHelper;\r
-\r
-public class NeutronNBInterfaces {\r
-\r
-    // return a class that implements the IfNBNetworkCRUD interface\r
-    static INeutronNetworkCRUD getIfNBNetworkCRUD(String containerName, Object o) {\r
- /*       IContainerManager containerManager = (IContainerManager) ServiceHelper\r
-                .getGlobalInstance(IContainerManager.class, o);\r
-        if (containerManager == null) {\r
-            throw new ServiceUnavailableException("Container "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        boolean found = false;\r
-        List<String> containerNames = containerManager.getContainerNames();\r
-        for (String cName : containerNames) {\r
-            if (cName.trim().equalsIgnoreCase(containerName.trim())) {\r
-                found = true;\r
-            }\r
-        }\r
-\r
-        if (found == false) {\r
-            throw new ResourceNotFoundException(containerName + " "\r
-                    + RestMessages.NOCONTAINER.toString());\r
-        }\r
-\r
-        IfNBNetworkCRUD answer = (IfNBNetworkCRUD) ServiceHelper.getInstance(\r
-                IfNBNetworkCRUD.class, containerName, o); */\r
-\r
-        INeutronNetworkCRUD answer = NeutronCRUDInterfaces.getINeutronNetworkCRUD(o);\r
-\r
-        if (answer == null) {\r
-            throw new ServiceUnavailableException("Network CRUD Service "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        return answer;\r
-    }\r
-\r
-    // return a class that implements the IfNBSubnetCRUD interface\r
-    static INeutronSubnetCRUD getIfNBSubnetCRUD(String containerName, Object o) {\r
-        IContainerManager containerManager = (IContainerManager) ServiceHelper\r
-                .getGlobalInstance(IContainerManager.class, o);\r
-        if (containerManager == null) {\r
-            throw new ServiceUnavailableException("Container "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        boolean found = false;\r
-        List<String> containerNames = containerManager.getContainerNames();\r
-        for (String cName : containerNames) {\r
-            if (cName.trim().equalsIgnoreCase(containerName.trim())) {\r
-                found = true;\r
-            }\r
-        }\r
-\r
-        if (found == false) {\r
-            throw new ResourceNotFoundException(containerName + " "\r
-                    + RestMessages.NOCONTAINER.toString());\r
-        }\r
-\r
-        INeutronSubnetCRUD answer = (INeutronSubnetCRUD) ServiceHelper.getInstance(\r
-                INeutronSubnetCRUD.class, containerName, o);\r
-\r
-        if (answer == null) {\r
-            throw new ServiceUnavailableException("Network CRUD Service "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        return answer;\r
-    }\r
-\r
-    // return a class that implements the IfNBPortCRUD interface\r
-    static INeutronPortCRUD getIfNBPortCRUD(String containerName, Object o) {\r
-        IContainerManager containerManager = (IContainerManager) ServiceHelper\r
-                .getGlobalInstance(IContainerManager.class, o);\r
-        if (containerManager == null) {\r
-            throw new ServiceUnavailableException("Container "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        boolean found = false;\r
-        List<String> containerNames = containerManager.getContainerNames();\r
-        for (String cName : containerNames) {\r
-            if (cName.trim().equalsIgnoreCase(containerName.trim())) {\r
-                found = true;\r
-            }\r
-        }\r
-\r
-        if (found == false) {\r
-            throw new ResourceNotFoundException(containerName + " "\r
-                    + RestMessages.NOCONTAINER.toString());\r
-        }\r
-\r
-        INeutronPortCRUD answer = (INeutronPortCRUD) ServiceHelper.getInstance(\r
-                INeutronPortCRUD.class, containerName, o);\r
-\r
-        if (answer == null) {\r
-            throw new ServiceUnavailableException("Network CRUD Service "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        return answer;\r
-    }\r
-\r
-    // return a class that implements the IfNBRouterCRUD interface\r
-    static INeutronRouterCRUD getIfNBRouterCRUD(String containerName, Object o) {\r
-        IContainerManager containerManager = (IContainerManager) ServiceHelper\r
-                .getGlobalInstance(IContainerManager.class, o);\r
-        if (containerManager == null) {\r
-            throw new ServiceUnavailableException("Container "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        boolean found = false;\r
-        List<String> containerNames = containerManager.getContainerNames();\r
-        for (String cName : containerNames) {\r
-            if (cName.trim().equalsIgnoreCase(containerName.trim())) {\r
-                found = true;\r
-            }\r
-        }\r
-\r
-        if (found == false) {\r
-            throw new ResourceNotFoundException(containerName + " "\r
-                    + RestMessages.NOCONTAINER.toString());\r
-        }\r
-\r
-        INeutronRouterCRUD answer = (INeutronRouterCRUD) ServiceHelper.getInstance(\r
-                INeutronRouterCRUD.class, containerName, o);\r
-\r
-        if (answer == null) {\r
-            throw new ServiceUnavailableException("Network CRUD Service "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        return answer;\r
-    }\r
-\r
-    // return a class that implements the IfNBFloatingIPCRUD interface\r
-    static INeutronFloatingIPCRUD getIfNBFloatingIPCRUD(String containerName, Object o) {\r
-        IContainerManager containerManager = (IContainerManager) ServiceHelper\r
-                .getGlobalInstance(IContainerManager.class, o);\r
-        if (containerManager == null) {\r
-            throw new ServiceUnavailableException("Container "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        boolean found = false;\r
-        List<String> containerNames = containerManager.getContainerNames();\r
-        for (String cName : containerNames) {\r
-            if (cName.trim().equalsIgnoreCase(containerName.trim())) {\r
-                found = true;\r
-            }\r
-        }\r
-\r
-        if (found == false) {\r
-            throw new ResourceNotFoundException(containerName + " "\r
-                    + RestMessages.NOCONTAINER.toString());\r
-        }\r
-\r
-        INeutronFloatingIPCRUD answer = (INeutronFloatingIPCRUD) ServiceHelper.getInstance(\r
-                INeutronFloatingIPCRUD.class, containerName, o);\r
-\r
-        if (answer == null) {\r
-            throw new ServiceUnavailableException("Network CRUD Service "\r
-                    + RestMessages.SERVICEUNAVAILABLE.toString());\r
-        }\r
-\r
-        return answer;\r
-    }\r
-}\r
index b77536b..383009b 100644 (file)
@@ -29,6 +29,7 @@ import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.codehaus.enunciate.jaxrs.TypeHint;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkAware;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;\r
 import org.opendaylight.controller.northbound.commons.RestMessages;\r
 import org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException;\r
@@ -88,7 +89,7 @@ public class NeutronNetworksNorthbound {
             @QueryParam("page_reverse") String pageReverse\r
             // sorting not supported\r
         ) {\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -142,7 +143,7 @@ public class NeutronNetworksNorthbound {
             // return fields\r
             @QueryParam("fields") List<String> fields\r
             ) {\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -169,7 +170,7 @@ public class NeutronNetworksNorthbound {
             @ResponseCode(code = 400, condition = "Bad Request"),\r
             @ResponseCode(code = 401, condition = "Unauthorized") })\r
     public Response createNetworks(final NeutronNetworkRequest input) {\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -261,7 +262,7 @@ public class NeutronNetworksNorthbound {
     public Response updateNetwork(\r
             @PathParam("netUUID") String netUUID, final NeutronNetworkRequest input\r
             ) {\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -319,7 +320,7 @@ public class NeutronNetworksNorthbound {
             @ResponseCode(code = 409, condition = "Network In Use") })\r
     public Response deleteNetwork(\r
             @PathParam("netUUID") String netUUID) {\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
index 78646a6..f48a70d 100644 (file)
@@ -31,6 +31,7 @@ import org.opendaylight.controller.networkconfig.neutron.INeutronPortAware;
 import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetAware;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetCRUD;\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet;\r
 import org.opendaylight.controller.networkconfig.neutron.Neutron_IPs;\r
@@ -92,7 +93,7 @@ public class NeutronPortsNorthbound {
             @QueryParam("page_reverse") String pageReverse\r
             // sorting not supported\r
             ) {\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -138,7 +139,7 @@ public class NeutronPortsNorthbound {
             @PathParam("portUUID") String portUUID,\r
             // return fields\r
             @QueryParam("fields") List<String> fields ) {\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -171,17 +172,17 @@ public class NeutronPortsNorthbound {
             @ResponseCode(code = 501, condition = "Not Implemented"),\r
             @ResponseCode(code = 503, condition = "MAC generation failure") })\r
     public Response createPorts(final NeutronPortRequest input) {\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -356,12 +357,12 @@ public class NeutronPortsNorthbound {
             @PathParam("portUUID") String portUUID,\r
             NeutronPortRequest input\r
             ) {\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -441,7 +442,7 @@ public class NeutronPortsNorthbound {
         @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response deletePort(\r
             @PathParam("portUUID") String portUUID) {\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
index e83d1fe..df2009e 100644 (file)
@@ -30,6 +30,7 @@ import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;
 import org.opendaylight.controller.networkconfig.neutron.INeutronRouterAware;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronRouterCRUD;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetCRUD;\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronRouter;\r
@@ -91,7 +92,7 @@ public class NeutronRoutersNorthbound {
             @QueryParam("page_reverse") String pageReverse\r
             // sorting not supported\r
             ) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -135,7 +136,7 @@ public class NeutronRoutersNorthbound {
             @PathParam("routerUUID") String routerUUID,\r
             // return fields\r
             @QueryParam("fields") List<String> fields) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -164,12 +165,12 @@ public class NeutronRoutersNorthbound {
             @ResponseCode(code = 401, condition = "Unauthorized"),\r
             @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response createRouters(final NeutronRouterRequest input) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -240,12 +241,12 @@ public class NeutronRoutersNorthbound {
             @PathParam("routerUUID") String routerUUID,\r
             NeutronRouterRequest input\r
             ) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -319,7 +320,7 @@ public class NeutronRoutersNorthbound {
             @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response deleteRouter(\r
             @PathParam("routerUUID") String routerUUID) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -371,17 +372,17 @@ public class NeutronRoutersNorthbound {
             @PathParam("routerUUID") String routerUUID,\r
             NeutronRouter_Interface input\r
             ) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default",this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -456,17 +457,17 @@ public class NeutronRoutersNorthbound {
             @PathParam("routerUUID") String routerUUID,\r
             NeutronRouter_Interface input\r
             ) {\r
-        INeutronRouterCRUD routerInterface = NeutronNBInterfaces.getIfNBRouterCRUD("default",this);\r
+        INeutronRouterCRUD routerInterface = NeutronCRUDInterfaces.getINeutronRouterCRUD(this);\r
         if (routerInterface == null) {\r
             throw new ServiceUnavailableException("Router CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronPortCRUD portInterface = NeutronNBInterfaces.getIfNBPortCRUD("default",this);\r
+        INeutronPortCRUD portInterface = NeutronCRUDInterfaces.getINeutronPortCRUD(this);\r
         if (portInterface == null) {\r
             throw new ServiceUnavailableException("Port CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default",this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
index e73afb8..d2d7a5a 100644 (file)
@@ -30,6 +30,7 @@ import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetAware;\r
 import org.opendaylight.controller.networkconfig.neutron.INeutronSubnetCRUD;\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;\r
 import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet;\r
 import org.opendaylight.controller.northbound.commons.RestMessages;\r
 import org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException;\r
@@ -88,7 +89,7 @@ public class NeutronSubnetsNorthbound {
             @QueryParam("page_reverse") String pageReverse\r
             // sorting not supported\r
             ) {\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -133,7 +134,7 @@ public class NeutronSubnetsNorthbound {
             @PathParam("subnetUUID") String subnetUUID,\r
             // return fields\r
             @QueryParam("fields") List<String> fields) {\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default",this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -165,12 +166,12 @@ public class NeutronSubnetsNorthbound {
             @ResponseCode(code = 409, condition = "Conflict"),\r
             @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response createSubnets(final NeutronSubnetRequest input) {\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default",this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD(this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
         }\r
-        INeutronNetworkCRUD networkInterface = NeutronNBInterfaces.getIfNBNetworkCRUD("default", this);\r
+        INeutronNetworkCRUD networkInterface = NeutronCRUDInterfaces.getINeutronNetworkCRUD( this);\r
         if (networkInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -282,7 +283,7 @@ public class NeutronSubnetsNorthbound {
     public Response updateSubnet(\r
             @PathParam("subnetUUID") String subnetUUID, final NeutronSubnetRequest input\r
             ) {\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Subnet CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r
@@ -344,7 +345,7 @@ public class NeutronSubnetsNorthbound {
             @ResponseCode(code = 501, condition = "Not Implemented") })\r
     public Response deleteSubnet(\r
             @PathParam("subnetUUID") String subnetUUID) {\r
-        INeutronSubnetCRUD subnetInterface = NeutronNBInterfaces.getIfNBSubnetCRUD("default", this);\r
+        INeutronSubnetCRUD subnetInterface = NeutronCRUDInterfaces.getINeutronSubnetCRUD( this);\r
         if (subnetInterface == null) {\r
             throw new ServiceUnavailableException("Network CRUD Interface "\r
                     + RestMessages.SERVICEUNAVAILABLE.toString());\r