Fixed for bug 1197 36/8536/1
authorfaizan <md.faizan@tcs.com>
Wed, 2 Jul 2014 11:29:49 +0000 (16:59 +0530)
committerfaizan <md.faizan@tcs.com>
Wed, 2 Jul 2014 11:30:32 +0000 (17:00 +0530)
Change-Id: Ibb9832f891b7e81e1d88fbe7c564e74b2c140b8a
Signed-off-by: faizan <md.faizan@tcs.com>
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronRoutersNorthbound.java

index 17b2fcfcf9ef43437903f499dc4da2aceb61983b..806e853b3604ec7848e08176aaf7f8d8e8f3996f 100644 (file)
@@ -422,7 +422,9 @@ public class NeutronRoutersNorthbound {
         if (instances != null) {
             for (Object instance : instances) {
                 INeutronRouterAware service = (INeutronRouterAware) instance;
-                service.canAttachInterface(target, input);
+                int status = service.canAttachInterface(target, input);
+                if (status < 200 || status > 299)
+                    return Response.status(status).build();
             }
         }
 
@@ -498,7 +500,9 @@ public class NeutronRoutersNorthbound {
             if (instances != null) {
                 for (Object instance : instances) {
                     INeutronRouterAware service = (INeutronRouterAware) instance;
-                    service.canDetachInterface(target, input);
+                    int status = service.canDetachInterface(target, input);
+                    if (status < 200 || status > 299)
+                        return Response.status(status).build();
                 }
             }