add dependency check for security rule's group update(), not just add()
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / AbstractNeutronNorthbound.java
index a1a647a1aa78cbf9ce1031549387478f1b05a297..39a9b4d340a420ce503f18cefcd6493430eb7f0c 100644 (file)
@@ -156,6 +156,8 @@ public abstract class AbstractNeutronNorthbound<T extends INeutronObject<T>, R e
         Result updateResult = neutronCRUD.update(uuid, delta);
         if (updateResult.equals(DoesNotExist)) {
             throw new ResourceNotFoundException(uuidNoExist());
+        } else if (updateResult.equals(DependencyMissing)) {
+            return Response.status(HTTP_MISSING_DEPENDENCY).entity(input).build();
         }
         T updated = neutronCRUD.get(uuid);
         return Response.status(HttpURLConnection.HTTP_OK).entity(newNeutronRequest(updated)).build();