northbound: Split out AD-SAL logic from AbstractNeturonNorthbound 32/28232/2
authorIsaku Yamahata <isaku.yamahata@intel.com>
Fri, 9 Oct 2015 18:43:46 +0000 (11:43 -0700)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Fri, 16 Oct 2015 22:00:30 +0000 (15:00 -0700)
This is a follow up patch for
  changeset of 43f88bf737adcb2e5df9e106d8b491de1549c41d
  change id of I3de3f9461047363501f0e3a6428580f93402c65b
  Neutron*Northbound: consolidate crud logic
and
  changeset of aafe31458a9990f50023566aed7f7b296b95067c,
  change id of I2c36c104dbd6c891a36c10419ed28d8060958d29.
  BGPVPN: Added yang, api and transcriber for BGPVPN

bgpvpn which was newly introduced after AD-SAL deprection doesn't implement
AD-SAL. So the class of NeutronBgpvpnsNorthbound requires its super class,
AbstractNeutronNorthbound, not to use AD-SAL.
This patch factors out ad-sal logic from AbstractNeutronNorthbound
into new subclass, AbstractNeutronNorthboundIAware with minor compilation
adjustment.

Change-Id: I9ce990558f178f1571cfac9760dd333b5b40174f
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
23 files changed:
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthboundIAware.java [new file with mode: 0644]
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronBgpvpnsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallPolicyNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRulesNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFloatingIPsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerHealthMonitorNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerListenerNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRulesNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNetworksNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronPortsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRoutersNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityGroupsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityRulesNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSubnetsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVPNIKEPoliciesNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVPNIPSECPoliciesNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVPNIPSECSiteConnectionsNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVPNServicesNorthbound.java

index 6ad932ad8d41ed428922615a4856ca69f40377d9..34db637c3a9c06d40d8a06ad0d7068f2bbce2c29 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2015 Intel Corporation  All rights reserved.
- * Copyright (c) 2015 Isaku Yamahata  All rights reserved.
+ * Copyright (c) 2015 Intel Corporation and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -22,7 +21,7 @@ import javax.ws.rs.core.Response;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class AbstractNeutronNorthbound<T extends NeutronObject, NeutronRequest extends INeutronRequest<T>, I extends INeutronCRUD<T>, INeutronAware> {
+public abstract class AbstractNeutronNorthbound<T extends NeutronObject, NeutronRequest extends INeutronRequest<T>, I extends INeutronCRUD<T>> {
     private static final Logger LOGGER = LoggerFactory
         .getLogger(AbstractNeutronNorthbound.class);
 
@@ -31,12 +30,11 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
 
     private static final String INTERFACE_NAME_BASE = " CRUD Interface";
     private static final String UUID_NO_EXIST_BASE = " UUID does not exist.";
-    protected static final String NO_PROVIDERS = "No providers registered.  Please try again later";
-    protected static final String NO_PROVIDER_LIST = "Couldn't get providers list.  Please try again later";
 
     protected final String serviceUnavailable() {
         return getResourceName() + INTERFACE_NAME_BASE + RestMessages.SERVICEUNAVAILABLE.toString();
     }
+
     protected final String uuidNoExist() {
         return getResourceName() + UUID_NO_EXIST_BASE;
     }
@@ -45,13 +43,6 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
     protected abstract T extractFields(T o, List<String> fields);
     protected abstract NeutronRequest newNeutronRequest(T o);
     protected abstract I getNeutronCRUD();
-    protected abstract Object[] getInstances();
-    protected abstract int canCreate(Object instance, T singleton);
-    protected abstract void created(Object instance, T singleton);
-    protected abstract int canUpdate(Object instance, T delta, T original);
-    protected abstract void updated(Object instance, T original);
-    protected abstract int canDelete(Object instance, T singleton);
-    protected abstract void deleted(Object instance, T singleton);
 
     protected Response show(String uuid,
                             // return fields
@@ -74,58 +65,12 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
         if (input.isSingleton()) {
             T singleton = input.getSingleton();
 
-            Object[] instances = this.getInstances();
-            if (instances != null) {
-                if (instances.length > 0) {
-                    for (Object instance : instances) {
-                        int status = this.canCreate(instance, singleton);
-                        if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
-                            return Response.status(status).build();
-                        }
-                    }
-                } else {
-                    throw new ServiceUnavailableException(NO_PROVIDERS);
-                }
-            } else {
-                throw new ServiceUnavailableException(NO_PROVIDER_LIST);
-            }
             singleton.initDefaults();
             neutronCRUD.add(singleton);
-            if (instances != null) {
-                for (Object instance : instances) {
-                    created(instance, singleton);
-                }
-            }
         } else {
-            Object[] instances = this.getInstances();
-            for (T test : input.getBulk()) {
-                if (instances != null) {
-                    if (instances.length > 0) {
-                        for (Object instance : instances) {
-                            int status = canCreate(instance, test);
-                            if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
-                                return Response.status(status).build();
-                            }
-                        }
-                    } else {
-                        throw new ServiceUnavailableException(NO_PROVIDERS);
-                    }
-                } else {
-                    throw new ServiceUnavailableException(NO_PROVIDER_LIST);
-                }
-            }
-
-            /*
-             * now, each element of the bulk request can be added to the cache
-             */
             for (T test : input.getBulk()) {
                 test.initDefaults();
                 neutronCRUD.add(test);
-                if (instances != null) {
-                    for (Object instance : instances) {
-                        this.created(instance, test);
-                    }
-                }
             }
         }
         return Response.status(HttpURLConnection.HTTP_CREATED).entity(input).build();
@@ -146,32 +91,11 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
         }
         updateDelta(uuid, delta, original);
 
-        Object[] instances = getInstances();
-        if (instances != null) {
-            if (instances.length > 0) {
-                for (Object instance : instances) {
-                    int status = canUpdate(instance, delta, original);
-                    if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
-                        return Response.status(status).build();
-                    }
-                }
-            } else {
-                throw new ServiceUnavailableException(NO_PROVIDERS);
-            }
-        } else {
-            throw new ServiceUnavailableException(NO_PROVIDER_LIST);
-        }
-
         /*
          * update the object and return it
          */
         neutronCRUD.update(uuid, delta);
         T updated = neutronCRUD.get(uuid);
-        if (instances != null) {
-            for (Object instance : instances) {
-                updated(instance, updated);
-            }
-        }
         return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(neutronCRUD.get(uuid))).build();
     }
 
@@ -179,21 +103,6 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
         final I neutronCRUD = getNeutronCRUD();
 
         T singleton = neutronCRUD.get(uuid);
-        Object[] instances = getInstances();
-        if (instances != null) {
-            if (instances.length > 0) {
-                for (Object instance : instances) {
-                    int status = canDelete(instance, singleton);
-                    if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
-                        return Response.status(status).build();
-                    }
-                }
-            } else {
-                throw new ServiceUnavailableException(NO_PROVIDERS);
-            }
-        } else {
-            throw new ServiceUnavailableException(NO_PROVIDER_LIST);
-        }
 
         /*
          * remove it and return 204 status
@@ -212,11 +121,6 @@ public abstract class AbstractNeutronNorthbound<T extends NeutronObject, Neutron
             throw new ResourceNotFoundException(uuidNoExist());
         }
 
-        if (instances != null) {
-            for (Object instance : instances) {
-                deleted(instance, singleton);
-            }
-        }
         return Response.status(HttpURLConnection.HTTP_NO_CONTENT).build();
     }
 }
diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthboundIAware.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthboundIAware.java
new file mode 100644 (file)
index 0000000..3dfc642
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2015 Intel Corporation and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.neutron.northbound.api;
+
+import java.net.HttpURLConnection;
+import java.util.List;
+
+import org.codehaus.enunciate.jaxrs.ResponseCode;
+import org.codehaus.enunciate.jaxrs.StatusCodes;
+import org.opendaylight.neutron.spi.INeutronCRUD;
+import org.opendaylight.neutron.spi.NeutronObject;
+
+import javax.ws.rs.core.Response;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+// When INeutron*Aware interfaces are deleted, this class should be deleted for BORON
+@Deprecated
+public abstract class AbstractNeutronNorthboundIAware<T extends NeutronObject, NeutronRequest extends INeutronRequest<T>, I extends INeutronCRUD<T>, INeutronAware>
+    extends AbstractNeutronNorthbound<T, NeutronRequest, I> {
+    private static final Logger LOGGER = LoggerFactory
+        .getLogger(AbstractNeutronNorthboundIAware.class);
+
+    protected static final String NO_PROVIDERS = "No providers registered.  Please try again later";
+    protected static final String NO_PROVIDER_LIST = "Couldn't get providers list.  Please try again later";
+
+    protected abstract Object[] getInstances();
+    protected abstract int canCreate(Object instance, T singleton);
+    protected abstract void created(Object instance, T singleton);
+    protected abstract int canUpdate(Object instance, T delta, T original);
+    protected abstract void updated(Object instance, T original);
+    protected abstract int canDelete(Object instance, T singleton);
+    protected abstract void deleted(Object instance, T singleton);
+
+    @Override
+    protected Response create(final NeutronRequest input) {
+        I neutronCRUD = getNeutronCRUD();
+        if (input.isSingleton()) {
+            T singleton = input.getSingleton();
+
+            Object[] instances = this.getInstances();
+            if (instances != null) {
+                if (instances.length > 0) {
+                    for (Object instance : instances) {
+                        int status = this.canCreate(instance, singleton);
+                        if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
+                            return Response.status(status).build();
+                        }
+                    }
+                } else {
+                    throw new ServiceUnavailableException(NO_PROVIDERS);
+                }
+            } else {
+                throw new ServiceUnavailableException(NO_PROVIDER_LIST);
+            }
+            singleton.initDefaults();
+            neutronCRUD.add(singleton);
+            if (instances != null) {
+                for (Object instance : instances) {
+                    created(instance, singleton);
+                }
+            }
+        } else {
+            Object[] instances = this.getInstances();
+            for (T test : input.getBulk()) {
+                if (instances != null) {
+                    if (instances.length > 0) {
+                        for (Object instance : instances) {
+                            int status = canCreate(instance, test);
+                            if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
+                                return Response.status(status).build();
+                            }
+                        }
+                    } else {
+                        throw new ServiceUnavailableException(NO_PROVIDERS);
+                    }
+                } else {
+                    throw new ServiceUnavailableException(NO_PROVIDER_LIST);
+                }
+            }
+
+            /*
+             * now, each element of the bulk request can be added to the cache
+             */
+            for (T test : input.getBulk()) {
+                test.initDefaults();
+                neutronCRUD.add(test);
+                if (instances != null) {
+                    for (Object instance : instances) {
+                        this.created(instance, test);
+                    }
+                }
+            }
+        }
+        return Response.status(HttpURLConnection.HTTP_CREATED).entity(input).build();
+    }
+
+    @Override
+    protected Response update(String uuid, final NeutronRequest input) {
+        I neutronCRUD = getNeutronCRUD();
+        if (!input.isSingleton()) {
+            throw new BadRequestException("Only singleton edit supported");
+        }
+        T delta = input.getSingleton();
+        T original = neutronCRUD.get(uuid);
+        if (original == null) {
+            throw new ResourceNotFoundException(getResourceName() + " doesn't Exist");
+        }
+        updateDelta(uuid, delta, original);
+
+        Object[] instances = getInstances();
+        if (instances != null) {
+            if (instances.length > 0) {
+                for (Object instance : instances) {
+                    int status = canUpdate(instance, delta, original);
+                    if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
+                        return Response.status(status).build();
+                    }
+                }
+            } else {
+                throw new ServiceUnavailableException(NO_PROVIDERS);
+            }
+        } else {
+            throw new ServiceUnavailableException(NO_PROVIDER_LIST);
+        }
+
+        /*
+         * update the object and return it
+         */
+        neutronCRUD.update(uuid, delta);
+        T updated = neutronCRUD.get(uuid);
+        if (instances != null) {
+            for (Object instance : instances) {
+                updated(instance, updated);
+            }
+        }
+        return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(neutronCRUD.get(uuid))).build();
+    }
+
+    @Override
+    protected Response delete(String uuid) {
+        final I neutronCRUD = getNeutronCRUD();
+
+        T singleton = neutronCRUD.get(uuid);
+        Object[] instances = getInstances();
+        if (instances != null) {
+            if (instances.length > 0) {
+                for (Object instance : instances) {
+                    int status = canDelete(instance, singleton);
+                    if (status < HTTP_OK_BOTTOM || status > HTTP_OK_TOP) {
+                        return Response.status(status).build();
+                    }
+                }
+            } else {
+                throw new ServiceUnavailableException(NO_PROVIDERS);
+            }
+        } else {
+            throw new ServiceUnavailableException(NO_PROVIDER_LIST);
+        }
+
+        /*
+         * remove it and return 204 status
+         */
+        final String resourceName = getResourceName();
+        boolean exist = false;
+        try {
+            exist = neutronCRUD.remove(uuid);
+        } catch (Exception e) {
+            LOGGER.debug("exception during remove {} {} {}",
+                         resourceName, uuid, e);
+            throw new InternalServerErrorException("Could not delete " +
+                                                   resourceName);
+        }
+        if (!exist) {
+            throw new ResourceNotFoundException(uuidNoExist());
+        }
+
+        if (instances != null) {
+            for (Object instance : instances) {
+                deleted(instance, singleton);
+            }
+        }
+        return Response.status(HttpURLConnection.HTTP_NO_CONTENT).build();
+    }
+}
index ec551fa3cae38bb456c86e32a213af68d65096d3..3f9837b9ec39c7265fd2054b17faca76125f1faa 100644 (file)
@@ -54,22 +54,36 @@ import org.opendaylight.neutron.spi.NeutronBgpvpn;
  */
 
 @Path("/bgpvpns")
-public class NeutronBgpvpnsNorthbound {
+public class NeutronBgpvpnsNorthbound
+    extends AbstractNeutronNorthbound<NeutronBgpvpn, NeutronBgpvpnRequest, INeutronBgpvpnCRUD> {
 
     @Context
     UriInfo uriInfo;
 
     private static final String RESOURCE_NAME = "Bgpvpn";
-    private NeutronBgpvpn extractFields(NeutronBgpvpn o, List<String> fields) {
+
+    @Override
+    protected String getResourceName() {
+        return RESOURCE_NAME;
+    }
+
+    @Override
+    protected NeutronBgpvpn extractFields(NeutronBgpvpn o, List<String> fields) {
         return o.extractFields(fields);
     }
 
-    private NeutronCRUDInterfaces getNeutronInterfaces() {
+    @Override
+    protected NeutronBgpvpnRequest newNeutronRequest(NeutronBgpvpn o) {
+        return new NeutronBgpvpnRequest(o);
+    }
+
+    @Override
+    protected INeutronBgpvpnCRUD getNeutronCRUD() {
         NeutronCRUDInterfaces answer = new NeutronCRUDInterfaces().fetchINeutronBgpvpnCRUD(this);
         if (answer.getBgpvpnInterface() == null) {
-            throw new ServiceUnavailableException("Service is unavailable");
+            throw new ServiceUnavailableException(serviceUnavailable());
         }
-        return answer;
+        return answer.getBgpvpnInterface();
     }
 
     /**
@@ -100,7 +114,7 @@ public class NeutronBgpvpnsNorthbound {
             @DefaultValue("false") @QueryParam("page_reverse") Boolean pageReverse
             // sorting not supported
             ) {
-        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
+        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronCRUD();
         List<NeutronBgpvpn> allBgpvpns = bgpvpnInterface.getAllBgpvpns();
         List<NeutronBgpvpn> ans = new ArrayList<NeutronBgpvpn>();
         Iterator<NeutronBgpvpn> i = allBgpvpns.iterator();
@@ -158,9 +172,9 @@ public class NeutronBgpvpnsNorthbound {
             // return fields
             @QueryParam("fields") List<String> fields
             ) {
-        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
+        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronCRUD();
         if (!bgpvpnInterface.bgpvpnExists(bgpvpnUUID)) {
-            throw new ResourceNotFoundException("UUID does not exist");
+            throw new ResourceNotFoundException(uuidNoExist());
         }
         if (fields.size() > 0) {
             NeutronBgpvpn ans = bgpvpnInterface.getBgpvpn(bgpvpnUUID);
@@ -182,7 +196,7 @@ public class NeutronBgpvpnsNorthbound {
         @ResponseCode(code = HttpURLConnection.HTTP_CREATED, condition = "Created"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response createBgpvpns(final NeutronBgpvpnRequest input) {
-        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
+        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronCRUD();
         if (input.isSingleton()) {
             NeutronBgpvpn singleton = input.getSingleton();
 
@@ -212,7 +226,7 @@ public class NeutronBgpvpnsNorthbound {
     public Response updateBgpvpn(
             @PathParam("bgpvpnUUID") String bgpvpnUUID, final NeutronBgpvpnRequest input
             ) {
-        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
+        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronCRUD();
 
         NeutronBgpvpn updatedObject = input.getSingleton();
         NeutronBgpvpn original = bgpvpnInterface.getBgpvpn(bgpvpnUUID);
@@ -246,7 +260,7 @@ public class NeutronBgpvpnsNorthbound {
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteBgpvpn(
             @PathParam("bgpvpnUUID") String bgpvpnUUID) {
-        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronInterfaces().getBgpvpnInterface();
+        INeutronBgpvpnCRUD bgpvpnInterface = getNeutronCRUD();
 
         if (!bgpvpnInterface.removeBgpvpn(bgpvpnUUID)) {
             throw new InternalServerErrorException("Could not delete bgpvpn");
index f799bf5fa3b3d083c641c88a2be258f1d783f5cf..b5d6490e7dc03939073fb777c77606ab359bc0f1 100644 (file)
@@ -50,7 +50,7 @@ import java.util.List;
  */
 @Path("/fw/firewalls")
 public class NeutronFirewallNorthbound
-    extends AbstractNeutronNorthbound<NeutronFirewall, NeutronFirewallRequest, INeutronFirewallCRUD, INeutronFirewallAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronFirewall, NeutronFirewallRequest, INeutronFirewallCRUD, INeutronFirewallAware> {
 
     private static final String RESOURCE_NAME = "Firewall";
 
index e95f601586226a960ece935ed70e3a9479783504..9d3c49e5b5bfa205b8c735b01852875ba64b3453 100644 (file)
@@ -51,7 +51,7 @@ import org.opendaylight.neutron.spi.NeutronFirewallPolicy;
  */
 @Path("/fw/firewall_policies")
 public class NeutronFirewallPolicyNorthbound
-    extends AbstractNeutronNorthbound<NeutronFirewallPolicy, NeutronFirewallPolicyRequest, INeutronFirewallPolicyCRUD, INeutronFirewallPolicyAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronFirewallPolicy, NeutronFirewallPolicyRequest, INeutronFirewallPolicyCRUD, INeutronFirewallPolicyAware> {
 
     private static final String RESOURCE_NAME = "Firewall Policy";
 
index 41a9567f21c389e135f24b264ff37ae0c644fc3c..7aac5c3b02e70675f3d68dfaa7a13418fda08b58 100644 (file)
@@ -51,7 +51,7 @@ import org.opendaylight.neutron.spi.NeutronFirewallRule;
 
 @Path("fw/firewall_rules")
 public class NeutronFirewallRulesNorthbound
-    extends AbstractNeutronNorthbound<NeutronFirewallRule, NeutronFirewallRuleRequest, INeutronFirewallRuleCRUD, INeutronFirewallRuleAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronFirewallRule, NeutronFirewallRuleRequest, INeutronFirewallRuleCRUD, INeutronFirewallRuleAware> {
     private static final String RESOURCE_NAME = "Firewall Rule";
 
     @Override
index c1577f33bc8a9089505df75becd172671f24828e..b69b6d59fefd5e3a89785261aa2b3199ee537dc0 100644 (file)
@@ -57,7 +57,7 @@ import org.opendaylight.neutron.spi.NeutronNetwork;
 
 @Path("/floatingips")
 public class NeutronFloatingIPsNorthbound
-    extends AbstractNeutronNorthbound<NeutronFloatingIP, NeutronFloatingIPRequest, INeutronFloatingIPCRUD, INeutronFloatingIPAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronFloatingIP, NeutronFloatingIPRequest, INeutronFloatingIPCRUD, INeutronFloatingIPAware> {
     private static final String RESOURCE_NAME = "Floating IP";
 
     @Override
index 5a70fe4c24aaad6184e259ec1cdd84b470677410..ae3898293703148bdc4258d505b51bc7037652f1 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerHealthMonitor;
  */
 @Path("/lbaas/healthmonitors")
 public class NeutronLoadBalancerHealthMonitorNorthbound
-    extends AbstractNeutronNorthbound<NeutronLoadBalancerHealthMonitor, NeutronLoadBalancerHealthMonitorRequest, INeutronLoadBalancerHealthMonitorCRUD, INeutronLoadBalancerHealthMonitorAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronLoadBalancerHealthMonitor, NeutronLoadBalancerHealthMonitorRequest, INeutronLoadBalancerHealthMonitorCRUD, INeutronLoadBalancerHealthMonitorAware> {
 
     private static final String RESOURCE_NAME = "LoadBalancerHealthMonitor";
 
index 94b3c4555140fe22b0b05858c6d49ae3b676c9fd..b9ffe256fb392ed64a487086c17953dd3d12b713 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerListener;
  */
 @Path("/lbaas/listeners")
 public class NeutronLoadBalancerListenerNorthbound
-    extends AbstractNeutronNorthbound<NeutronLoadBalancerListener, NeutronLoadBalancerListenerRequest, INeutronLoadBalancerListenerCRUD, INeutronLoadBalancerListenerAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronLoadBalancerListener, NeutronLoadBalancerListenerRequest, INeutronLoadBalancerListenerCRUD, INeutronLoadBalancerListenerAware> {
 
     private static final String RESOURCE_NAME = "LoadBalancerListener";
 
index 9482158ed95d9c4e398f6241079626b7e86a3e6d..8d15a6906a42d2d2f2ac1333ecaae59c6b182903 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancer;
  */
 @Path("/lbaas/loadbalancers")
 public class NeutronLoadBalancerNorthbound
-    extends AbstractNeutronNorthbound<NeutronLoadBalancer, NeutronLoadBalancerRequest, INeutronLoadBalancerCRUD, INeutronLoadBalancerAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronLoadBalancer, NeutronLoadBalancerRequest, INeutronLoadBalancerCRUD, INeutronLoadBalancerAware> {
 
     private static final String RESOURCE_NAME = "LoadBalancer";
 
index a1bc23ab89a6e5c85514cd508e8f6153a6708b08..949163b20cb4fa227c5c00a06c4d988a98241171 100644 (file)
@@ -60,7 +60,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerPoolMember;
 
 @Path("/lbaas/pools")
 public class NeutronLoadBalancerPoolNorthbound
-    extends AbstractNeutronNorthbound<NeutronLoadBalancerPool, NeutronLoadBalancerPoolRequest, INeutronLoadBalancerPoolCRUD, INeutronLoadBalancerPoolAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronLoadBalancerPool, NeutronLoadBalancerPoolRequest, INeutronLoadBalancerPoolCRUD, INeutronLoadBalancerPoolAware> {
 
     private static final String RESOURCE_NAME = "LoadBalancerPool";
 
index 915fd14e0cba4724cb17cc527a41793a76f8dd9a..1b9f68be8501f02e050404ded0715e5258f8fc2a 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronMeteringLabelRule;
 
 @Path("/metering/metering-label-rules")
 public class NeutronMeteringLabelRulesNorthbound
-    extends AbstractNeutronNorthbound<NeutronMeteringLabelRule, NeutronMeteringLabelRuleRequest, INeutronMeteringLabelRuleCRUD, INeutronMeteringLabelRuleAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronMeteringLabelRule, NeutronMeteringLabelRuleRequest, INeutronMeteringLabelRuleCRUD, INeutronMeteringLabelRuleAware> {
     private static final String RESOURCE_NAME = "Metering Label Rule";
 
     @Override
index f8f68c4dcb364334aeaa21955a8a621163473710..89dd9e15a69a20f9a6a73a05cae1e74aeba9b630 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronMeteringLabel;
 
 @Path("/metering/metering-labels")
 public class NeutronMeteringLabelsNorthbound
-    extends AbstractNeutronNorthbound<NeutronMeteringLabel, NeutronMeteringLabelRequest, INeutronMeteringLabelCRUD, INeutronMeteringLabelAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronMeteringLabel, NeutronMeteringLabelRequest, INeutronMeteringLabelCRUD, INeutronMeteringLabelAware> {
     private static final String RESOURCE_NAME = "Metering Label";
 
     @Override
index b5db791c5986ddac8bd3d9cd08ed96d2cb9d2f14..1fcfa43d22f0d96d29d8e53643f6e4b1429736ad 100644 (file)
@@ -57,7 +57,7 @@ import org.opendaylight.neutron.spi.NeutronNetwork;
 
 @Path("/networks")
 public class NeutronNetworksNorthbound
-    extends AbstractNeutronNorthbound<NeutronNetwork, NeutronNetworkRequest, INeutronNetworkCRUD, INeutronNetworkAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronNetwork, NeutronNetworkRequest, INeutronNetworkCRUD, INeutronNetworkAware> {
 
     @Context
     UriInfo uriInfo;
index afa5e9a6a628ad3f347ae1a3c67664c959c41c40..57c311a53196f5862db86ab75c26b96bd64be0d8 100644 (file)
@@ -58,7 +58,7 @@ import org.opendaylight.neutron.spi.NeutronPort;
 
 @Path("/ports")
 public class NeutronPortsNorthbound
-    extends AbstractNeutronNorthbound<NeutronPort, NeutronPortRequest, INeutronPortCRUD, INeutronPortAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronPort, NeutronPortRequest, INeutronPortCRUD, INeutronPortAware> {
 
     private static final String RESOURCE_NAME = "Port";
 
index 9fc2598652633bfbd57889ebf69ffe66a4135f66..e48118c0c6ac2737752d27855fc6b1fcb46c5b3b 100644 (file)
@@ -58,7 +58,7 @@ import org.opendaylight.neutron.spi.NeutronRouter_Interface;
 
 @Path("/routers")
 public class NeutronRoutersNorthbound
-    extends AbstractNeutronNorthbound<NeutronRouter, NeutronRouterRequest, INeutronRouterCRUD, INeutronRouterAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronRouter, NeutronRouterRequest, INeutronRouterCRUD, INeutronRouterAware> {
     static final String ROUTER_INTERFACE_STR = "network:router_interface";
     static final String ROUTER_GATEWAY_STR = "network:router_gateway";
     private static final String RESOURCE_NAME = "Router";
index defda367d2cf4f4492b71fe261b25c1ee71cf592..70ee246b40303d23e52638f1520cbaf5d4d0ac2b 100644 (file)
@@ -51,7 +51,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityGroup;
  */
 @Path ("/security-groups")
 public class NeutronSecurityGroupsNorthbound
-    extends AbstractNeutronNorthbound<NeutronSecurityGroup, NeutronSecurityGroupRequest, INeutronSecurityGroupCRUD, INeutronSecurityGroupAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronSecurityGroup, NeutronSecurityGroupRequest, INeutronSecurityGroupCRUD, INeutronSecurityGroupAware> {
     private static final String RESOURCE_NAME = "Security Group";
 
     @Override
index b3dc4daa3493547b2b748ca7f43bdaff1c43b508..12955d77b6cca46441fa4cfbad22bed4fda0cc26 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityRule;
 
 @Path ("/security-group-rules")
 public class NeutronSecurityRulesNorthbound
-    extends AbstractNeutronNorthbound<NeutronSecurityRule, NeutronSecurityRuleRequest, INeutronSecurityRuleCRUD, INeutronSecurityRuleAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronSecurityRule, NeutronSecurityRuleRequest, INeutronSecurityRuleCRUD, INeutronSecurityRuleAware> {
     private static final String RESOURCE_NAME = "Security Rule";
 
     @Override
index 8159700c428ed2727cc8d62bdb319fdddc6939eb..5b20b17673cb28648d11ebc1c282ff8bfcfd45c7 100644 (file)
@@ -57,7 +57,7 @@ import org.opendaylight.neutron.spi.NeutronSubnet;
 
 @Path("/subnets")
 public class NeutronSubnetsNorthbound
-    extends AbstractNeutronNorthbound<NeutronSubnet, NeutronSubnetRequest, INeutronSubnetCRUD, INeutronSubnetAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronSubnet, NeutronSubnetRequest, INeutronSubnetCRUD, INeutronSubnetAware> {
     private static final String RESOURCE_NAME = "Subnet";
 
     @Override
index 56f397a415271fe31490e7a5fdc37a3980280fa3..a42ea92ddfd2b603c744f41e1d63ba28ce7bf2bf 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronVPNIKEPolicy;
 
 @Path("/vpn/ikepolicies")
 public class NeutronVPNIKEPoliciesNorthbound
-    extends AbstractNeutronNorthbound<NeutronVPNIKEPolicy, NeutronVPNIKEPolicyRequest, INeutronVPNIKEPolicyCRUD, INeutronVPNIKEPolicyAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronVPNIKEPolicy, NeutronVPNIKEPolicyRequest, INeutronVPNIKEPolicyCRUD, INeutronVPNIKEPolicyAware> {
     private static final String RESOURCE_NAME = "VPNIKEPolicy";
 
     @Override
index b87f610056da061073566879ab492aa38e50d318..10d6dda13b23d46d0293c460212e54a53c469fe0 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
 
 @Path("/vpn/ipsecpolicies")
 public class NeutronVPNIPSECPoliciesNorthbound
-    extends AbstractNeutronNorthbound<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD, INeutronVPNIPSECPolicyAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD, INeutronVPNIPSECPolicyAware> {
 
     private static final String RESOURCE_NAME = "VPNIPSECPolicy";
 
index 73bcbe0fdcc825d877f1cf2c038ec00471e9df3f..e5765c57ada898334d1be7f1432ed45792ebff10 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronVPNIPSECSiteConnection;
 
 @Path("/vpn/ipsecsiteconnections")
 public class NeutronVPNIPSECSiteConnectionsNorthbound
-    extends AbstractNeutronNorthbound<NeutronVPNIPSECSiteConnection, NeutronVPNIPSECSiteConnectionRequest, INeutronVPNIPSECSiteConnectionsCRUD, INeutronVPNIPSECSiteConnectionAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronVPNIPSECSiteConnection, NeutronVPNIPSECSiteConnectionRequest, INeutronVPNIPSECSiteConnectionsCRUD, INeutronVPNIPSECSiteConnectionAware> {
 
     private static final String RESOURCE_NAME = "VPNIPSECSiteConnections";
 
index 0166eda5f3e8b04cd9c04661c755482bbec45cd2..3579f1b7181d961f1d746b82aa479e7405e8f477 100644 (file)
@@ -56,7 +56,7 @@ import org.opendaylight.neutron.spi.NeutronVPNService;
 
 @Path("/vpn/vpnservices")
 public class NeutronVPNServicesNorthbound
-    extends AbstractNeutronNorthbound<NeutronVPNService, NeutronVPNServiceRequest, INeutronVPNServiceCRUD, INeutronVPNServiceAware> {
+    extends AbstractNeutronNorthboundIAware<NeutronVPNService, NeutronVPNServiceRequest, INeutronVPNServiceCRUD, INeutronVPNServiceAware> {
 
     private static final String RESOURCE_NAME = "VPNService";