Bug 5478 - northbound: improve 404 check on update/delete 67/36467/3
authorIsaku Yamahata <isaku.yamahata@intel.com>
Fri, 18 Mar 2016 19:22:48 +0000 (12:22 -0700)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Mon, 21 Mar 2016 20:55:06 +0000 (13:55 -0700)
canDelete should not be called on deletion on non-exist resource. Instead,
it should return 404 immediately without calling I*Aware.
This patch improves 404 check by adds missing 404 check by checking
return value on update and delete with a bit clean up.

Change-Id: Ia4fe068540022f687d942204f3b243ccbcbac578
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
27 files changed:
integration/test/src/test/java/org/opendaylight/neutron/e2etest/ITNeutronE2E.java
integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronSecurityRuleTests.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/AbstractNeutronNorthboundIAware.java
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/NeutronL2gatewayConnectionNorthbound.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayNorthbound.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 09b1af0e7d78ccdf92d223047b70681e1072e9ae..f96e2de37fd1a62b9e092cd2e24d697c1b100bb3 100644 (file)
@@ -223,17 +223,25 @@ public class ITNeutronE2E {
         }
     }
 
-    static void test_delete(String url_s, String context) {
+    static void test_delete(String url_s, int responseCode, String context) {
         try {
             URL url = new URL(url_s);
             HttpURLConnection httpConn = HttpURLConnectionFactoryDelete(url);
-            Assert.assertEquals(context, 204, httpConn.getResponseCode());
+            Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
         } catch (Exception e) {
             e.printStackTrace(); // temporary, remove me
             Assert.assertFalse("E2E Tests Failed", true);
         }
     }
 
+    static void test_delete(String url_s, String context) {
+        test_delete(url_s, 204, context);
+    }
+
+    static void test_delete_404(String url_s, String context) {
+        test_delete(url_s, 404, context);
+    }
+
     static private String fetchResponse(String url_s, String context) {
         StringBuffer response = new StringBuffer();
 
index fd42876a868b0a99716d21a9e21a9a343d83caa3..d48e72cb5fb22a9765a7e9cab59b168bae7ae5be 100644 (file)
@@ -128,6 +128,11 @@ public class NeutronSecurityRuleTests {
         ITNeutronE2E.test_fetch(url, false, "Security Rule Element Negative Get Failed");
     }
 
+    public void bug5478_rule_delete_negative_test() {
+        String url = base + "/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669";
+        ITNeutronE2E.test_delete_404(url, "Security Rule Delete 404 Failed");
+    }
+
     public void bug4043_ipv4_test() {
         String url = base + "/security-group-rules";
         String content = " {\"security_group_rule\": " +
@@ -205,6 +210,7 @@ public class NeutronSecurityRuleTests {
         securityRule_tester.securityRule_collection_get_test();
         securityRule_tester.sr_delete_test();
         securityRule_tester.sr_element_negative_get_test();
+        securityRule_tester.bug5478_rule_delete_negative_test();
         securityRule_tester.bug4043_ipv4_test();
         securityRule_tester.bug4043_ipv6_test();
         securityRule_tester.bug4550_sg_sr_test();
index 1f67034090b387b4528deeab41ada9f2a489ed3b..26bef3a001ba0a918c6a3d3cf6607784ed4acf8a 100644 (file)
@@ -48,15 +48,16 @@ public abstract class AbstractNeutronNorthbound<T extends INeutronObject, Neutro
                             // return fields
                             List<String> fields) {
         I neutronCRUD = getNeutronCRUD();
-        if (!neutronCRUD.exists(uuid)) {
+        T ans = neutronCRUD.get(uuid);
+        if (ans == null) {
             throw new ResourceNotFoundException(uuidNoExist());
         }
+
         if (fields.size() > 0) {
-            T ans = neutronCRUD.get(uuid);
             return Response.status(HttpURLConnection.HTTP_OK).entity(
                     newNeutronRequest(extractFields(ans, fields))).build();
         } else {
-            return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(neutronCRUD.get(uuid))).build();
+            return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(ans)).build();
         }
     }
 
@@ -87,14 +88,16 @@ public abstract class AbstractNeutronNorthbound<T extends INeutronObject, Neutro
         T delta = input.getSingleton();
         T original = neutronCRUD.get(uuid);
         if (original == null) {
-            throw new ResourceNotFoundException(getResourceName() + " doesn't Exist");
+            throw new ResourceNotFoundException(uuidNoExist());
         }
         updateDelta(uuid, delta, original);
 
         /*
          * update the object and return it
          */
-        neutronCRUD.update(uuid, delta);
+        if (!neutronCRUD.update(uuid, delta)) {
+            throw new ResourceNotFoundException(uuidNoExist());
+        }
         T updated = neutronCRUD.get(uuid);
         return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(neutronCRUD.get(uuid))).build();
     }
index 6b8dbc53763190209960e382455e336e8de6adbc..08743da42ac2a8bdbbea57666bd7245827b59577 100644 (file)
@@ -96,7 +96,7 @@ public abstract class AbstractNeutronNorthboundIAware<T extends INeutronObject,
         T delta = input.getSingleton();
         T original = neutronCRUD.get(uuid);
         if (original == null) {
-            throw new ResourceNotFoundException(getResourceName() + " doesn't Exist");
+            throw new ResourceNotFoundException(uuidNoExist());
         }
         updateDelta(uuid, delta, original);
 
@@ -113,7 +113,9 @@ public abstract class AbstractNeutronNorthboundIAware<T extends INeutronObject,
         /*
          * update the object and return it
          */
-        neutronCRUD.update(uuid, delta);
+        if (!neutronCRUD.update(uuid, delta)) {
+            throw new ResourceNotFoundException(uuidNoExist());
+        }
         T updated = neutronCRUD.get(uuid);
         if (instances != null) {
             for (Object instance : instances) {
@@ -128,6 +130,9 @@ public abstract class AbstractNeutronNorthboundIAware<T extends INeutronObject,
         final I neutronCRUD = getNeutronCRUD();
 
         T singleton = neutronCRUD.get(uuid);
+        if (singleton == null) {
+            throw new ResourceNotFoundException(uuidNoExist());
+        }
         Object[] instances = getInstances();
         if (instances != null) {
             for (Object instance : instances) {
index f85c55595fb240b1f5acf92621d5b1b24fc98188..9190ff49f62b6eb14f3878a39623c07276ae98bd 100644 (file)
@@ -206,6 +206,7 @@ public class NeutronBgpvpnsNorthbound
     //@TypeHint(OpenStackBgpvpns.class)
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateBgpvpn(
             @PathParam("bgpvpnUUID") String bgpvpnUUID, final NeutronBgpvpnRequest input
@@ -220,6 +221,7 @@ public class NeutronBgpvpnsNorthbound
     @DELETE
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteBgpvpn(
             @PathParam("bgpvpnUUID") String bgpvpnUUID) {
index 7ce34d43397d81176c4d9b2f1681f4d517c51214..d1650654a665025f00fa9dcc028fdcfd2ef834e0 100644 (file)
@@ -218,6 +218,7 @@ public class NeutronFirewallNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateFirewall(
             @PathParam("firewallUUID") String firewallUUID, final NeutronFirewallRequest input) {
@@ -231,6 +232,7 @@ public class NeutronFirewallNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteFirewall(
             @PathParam("firewallUUID") String firewallUUID) {
index 2b3c39c0f61b1739671e0e6cb143e98bfefde1e6..b8c25e98d4184a6afddaabec6321554e451f97a7 100644 (file)
@@ -217,6 +217,7 @@ public class NeutronFirewallPolicyNorthbound
     //@TypeHint(OpenStackSubnets.class)
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateFirewallPolicy(
             @PathParam("firewallPolicyUUID") String firewallPolicyUUID, final NeutronFirewallPolicyRequest input) {
@@ -230,6 +231,7 @@ public class NeutronFirewallPolicyNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteFirewallPolicy(
             @PathParam("firewallPolicyUUID") String firewallPolicyUUID) {
index 7aac5c3b02e70675f3d68dfaa7a13418fda08b58..f2324d380ce6fcfe2b57e64ab67cc44e367671df 100644 (file)
@@ -244,6 +244,7 @@ public class NeutronFirewallRulesNorthbound
     @Consumes({MediaType.APPLICATION_JSON})
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateFirewallRule(
             @PathParam("firewallRuleUUID") String firewallRuleUUID, final NeutronFirewallRuleRequest input) {
@@ -258,6 +259,7 @@ public class NeutronFirewallRulesNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteFirewallRule(
             @PathParam("firewallRuleUUID") String firewallRuleUUID) {
index b69b6d59fefd5e3a89785261aa2b3199ee537dc0..15a557ad49f6bb459cf28c52eb2394bc7022b39e 100644 (file)
@@ -240,6 +240,7 @@ public class NeutronFloatingIPsNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateFloatingIP(
             @PathParam("floatingipUUID") String floatingipUUID,
@@ -255,6 +256,7 @@ public class NeutronFloatingIPsNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteFloatingIP(
             @PathParam("floatingipUUID") String floatingipUUID) {
index ea1a0588f79d443f150a8e9fc7679f0f5306cf93..963af42d081659a2171ed98af361715daf4ef0af 100644 (file)
@@ -207,6 +207,8 @@ public class NeutronL2gatewayConnectionNorthbound
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT,
                 condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND,
+                condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE,
         condition = "No providers available") })
     public Response deleteL2gatewayConnection(
index dad83b4fd30e3c276369fd7dbc5cd40b0ff9ef74..2ae14b0e151635a1e156c8e42ef150fcb4c8de39 100644 (file)
@@ -197,6 +197,8 @@ public class NeutronL2gatewayNorthbound
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT,
                 condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND,
+                condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE,
         condition = "No providers available") })
     public Response deleteL2gateway(
@@ -217,6 +219,8 @@ public class NeutronL2gatewayNorthbound
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_OK,
                 condition = "Operation successful"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND,
+                condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE,
         condition = "No providers available") })
     public Response updateL2gateway(
index ae3898293703148bdc4258d505b51bc7037652f1..39db862dd669c5906b5e2d68607d4f18359b8e44 100644 (file)
@@ -238,6 +238,7 @@ public class NeutronLoadBalancerHealthMonitorNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateLoadBalancerHealthMonitor(
             @PathParam("loadBalancerHealthMonitorID") String loadBalancerHealthMonitorID,
@@ -253,6 +254,7 @@ public class NeutronLoadBalancerHealthMonitorNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteLoadBalancerHealthMonitor(
             @PathParam("loadBalancerHealthMonitorID") String loadBalancerHealthMonitorID) {
index bf32e2967e21bd8cce10ffdc8396169a47d3bc7a..fdcd6751587f894965505314616e1795bc95694e 100644 (file)
@@ -222,6 +222,7 @@ public class NeutronLoadBalancerListenerNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateLoadBalancerListener(
             @PathParam("loadBalancerListenerID") String loadBalancerListenerID, final NeutronLoadBalancerListenerRequest input) {
@@ -235,6 +236,7 @@ public class NeutronLoadBalancerListenerNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteLoadBalancerListener(
             @PathParam("loadBalancerListenerID") String loadBalancerListenerID) {
index 8d15a6906a42d2d2f2ac1333ecaae59c6b182903..304cd3a0ebea6b8a8e01d71f3ec9bc30d7b997a6 100644 (file)
@@ -220,6 +220,7 @@ public class NeutronLoadBalancerNorthbound
 
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateLoadBalancer(
             @PathParam("loadBalancerID") String loadBalancerID, final NeutronLoadBalancerRequest input) {
@@ -233,6 +234,7 @@ public class NeutronLoadBalancerNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteLoadBalancer(
             @PathParam("loadBalancerID") String loadBalancerID) {
index 98330783d2cdd339db01f06334d30c004a7ed678..649faf425c3355e2966e6da4b515a13168c80bf8 100644 (file)
@@ -237,6 +237,7 @@ public class NeutronLoadBalancerPoolNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateLoadBalancerPool(
             @PathParam("loadBalancerPoolID") String loadBalancerPoolID, final NeutronLoadBalancerPoolRequest input) {
@@ -251,6 +252,7 @@ public class NeutronLoadBalancerPoolNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteLoadBalancerPool(
             @PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID) {
@@ -449,7 +451,8 @@ public class NeutronLoadBalancerPoolNorthbound
     @Produces({ MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
-            @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful") })
+            @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found") })
     public Response updateLoadBalancerPoolMember(
             @PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID,
             @PathParam("loadBalancerPoolMemberUUID") String loadBalancerPoolMemberUUID,
@@ -494,6 +497,7 @@ public class NeutronLoadBalancerPoolNorthbound
     @DELETE
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteLoadBalancerPoolMember(
             @PathParam("loadBalancerPoolUUID") String loadBalancerPoolUUID,
index 412d3ca4d088c2948ff60d27f8be3b26bff761da..174ed9ca7d17fb4e80c634273ba01c548aa44b3d 100644 (file)
@@ -240,6 +240,7 @@ public class NeutronMeteringLabelRulesNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteMeteringLabelRule(
             @PathParam("ruleUUID") String ruleUUID) {
index 89dd9e15a69a20f9a6a73a05cae1e74aeba9b630..8fd8527f65cf14970f584bcd8e9c5eb5ad807980 100644 (file)
@@ -208,6 +208,7 @@ public class NeutronMeteringLabelsNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteMeteringLabel(
             @PathParam("labelUUID") String labelUUID) {
index 1fcfa43d22f0d96d29d8e53643f6e4b1429736ad..5ed1da0b74de540ffc29e02ca9511284f307c531 100644 (file)
@@ -261,6 +261,7 @@ public class NeutronNetworksNorthbound
     //@TypeHint(OpenStackNetworks.class)
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateNetwork(
             @PathParam("netUUID") String netUUID, final NeutronNetworkRequest input
@@ -275,6 +276,7 @@ public class NeutronNetworksNorthbound
     @DELETE
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteNetwork(
             @PathParam("netUUID") String netUUID) {
index f6325e9a8546e94bd05226a4293ee158159078c5..48c4df848d6b4dc8a0ba648096e211bc3e23e911 100644 (file)
@@ -283,6 +283,7 @@ public class NeutronPortsNorthbound
     //@TypeHint(OpenStackPorts.class)
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updatePort(
             @PathParam("portUUID") String portUUID,
@@ -300,6 +301,7 @@ public class NeutronPortsNorthbound
     @DELETE
     @StatusCodes({
         @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+        @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
         @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deletePort(
             @PathParam("portUUID") String portUUID) {
index 8de35bb95a973aa91d12f1af7be917f3616db536..2c8d6487f5c24832ad742943942afa236fd2213a 100644 (file)
@@ -262,6 +262,7 @@ public class NeutronRoutersNorthbound
     //@TypeHint(OpenStackRouters.class)
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateRouter(
             @PathParam("routerUUID") String routerUUID,
@@ -278,6 +279,7 @@ public class NeutronRoutersNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteRouter(
             @PathParam("routerUUID") String routerUUID) {
index 70ee246b40303d23e52638f1520cbaf5d4d0ac2b..f01d824b396c7170c779f0c10a9f2d2b782561a4 100644 (file)
@@ -210,6 +210,7 @@ public class NeutronSecurityGroupsNorthbound
     @Consumes ({MediaType.APPLICATION_JSON})
     @StatusCodes ({
             @ResponseCode (code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateSecurityGroup(
             @PathParam ("securityGroupUUID") String securityGroupUUID, final NeutronSecurityGroupRequest input) {
@@ -224,6 +225,7 @@ public class NeutronSecurityGroupsNorthbound
     @DELETE
     @StatusCodes ({
             @ResponseCode (code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteSecurityGroup(
             @PathParam ("securityGroupUUID") String securityGroupUUID) {
index 12955d77b6cca46441fa4cfbad22bed4fda0cc26..788b9a8fb5b1a07e32b52f2457c6fe450cbf2e13 100644 (file)
@@ -228,6 +228,7 @@ public class NeutronSecurityRulesNorthbound
     @Consumes ({MediaType.APPLICATION_JSON})
     @StatusCodes ({
             @ResponseCode (code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateSecurityRule(
             @PathParam ("securityRuleUUID") String securityRuleUUID, final NeutronSecurityRuleRequest input) {
@@ -242,6 +243,7 @@ public class NeutronSecurityRulesNorthbound
     @DELETE
     @StatusCodes ({
             @ResponseCode (code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteSecurityRule(
             @PathParam ("securityRuleUUID") String securityRuleUUID) {
index 5d46b8b05d5552b13aab326b773a9f92b030ada7..7e05b7c8e7659fcf67235a0e9ffbd8d6b79fc126 100644 (file)
@@ -264,6 +264,7 @@ public class NeutronSubnetsNorthbound
     //@TypeHint(OpenStackSubnets.class)
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateSubnet(
             @PathParam("subnetUUID") String subnetUUID, final NeutronSubnetRequest input
@@ -278,6 +279,7 @@ public class NeutronSubnetsNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteSubnet(
             @PathParam("subnetUUID") String subnetUUID) {
index a42ea92ddfd2b603c744f41e1d63ba28ce7bf2bf..5f5787f11f9cc0a3b8f77be26918f97048eeb232 100644 (file)
@@ -221,6 +221,7 @@ public class NeutronVPNIKEPoliciesNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateVPNIKEPolicy(
             @PathParam("policyID") String policyUUID, final NeutronVPNIKEPolicyRequest input
@@ -235,6 +236,7 @@ public class NeutronVPNIKEPoliciesNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteVPNIKEPolicy(
             @PathParam("policyID") String policyUUID) {
index 10d6dda13b23d46d0293c460212e54a53c469fe0..f099c086b93e2968199a84218a83d6f237b84a19 100644 (file)
@@ -222,6 +222,7 @@ public class NeutronVPNIPSECPoliciesNorthbound
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateVPNIPSECPolicy(
             @PathParam("policyID") String policyUUID, final NeutronVPNIPSECPolicyRequest input
@@ -236,6 +237,7 @@ public class NeutronVPNIPSECPoliciesNorthbound
     @DELETE
     @StatusCodes({
             @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteVPNIPSECPolicy(
             @PathParam("policyID") String policyUUID) {
index 379d70f2d9ac0d24f40cbf3ecb4dc2989c48447e..ffc93e4aa519cd1b53d59192f7123bf0eca0aff2 100644 (file)
@@ -228,6 +228,7 @@ public class NeutronVPNIPSECSiteConnectionsNorthbound
     @Produces({ MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateVPNIPSECSiteConnection(@PathParam("connectionID") String connectionID,
             final NeutronVPNIPSECSiteConnectionRequest input) {
@@ -241,6 +242,7 @@ public class NeutronVPNIPSECSiteConnectionsNorthbound
     @Path("{connectionID}")
     @DELETE
     @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteVPNIPSECSiteConnection(@PathParam("connectionID") String connectionID) {
         return delete(connectionID);
index 48c5578920504b8bfd0a6df6a4eca051e39758e3..ee8058aeec7c8b875fe0edff9a93d400e24fe039 100644 (file)
@@ -218,6 +218,7 @@ public class NeutronVPNServicesNorthbound
     @Produces({ MediaType.APPLICATION_JSON })
     @Consumes({ MediaType.APPLICATION_JSON })
     @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response updateVPNService(@PathParam("serviceID") String serviceID, final NeutronVPNServiceRequest input) {
         return update(serviceID, input);
@@ -230,6 +231,7 @@ public class NeutronVPNServicesNorthbound
     @Path("{serviceID}")
     @DELETE
     @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+            @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
             @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
     public Response deleteVPNService(@PathParam("serviceID") String serviceID) {
         return delete(serviceID);