Fail toggle flow if port is no longer a part of slice 30/1230/1
authorDiti Bhatia <dibhatia@cisco.com>
Tue, 17 Sep 2013 15:52:20 +0000 (08:52 -0700)
committerDiti Bhatia <dibhatia@cisco.com>
Tue, 17 Sep 2013 15:55:04 +0000 (08:55 -0700)
Change-Id: I637e8da1f16bb21a82e4a53939f6b00bdc84f993
Signed-off-by: Diti Bhatia <dibhatia@cisco.com>
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java

index d08b24d0783f796f2bda87da71fa34833d37411f..7feb7018ae65ee28ee3c4a0f769fb5660d4694f2 100644 (file)
@@ -1867,9 +1867,13 @@ public class ForwardingRulesManager implements
             }
         }
         if (target != null) {
-            // Program the network node
-            Status status = (target.installInHw()) ? this.uninstallFlowEntry(target.getFlowEntry()) : this
-                    .installFlowEntry(target.getFlowEntry());
+            Status status = target.validate(container);
+            if (!status.isSuccess()) {
+                log.warn(status.getDescription());
+                return status;
+            }
+            status = (target.installInHw()) ? this.uninstallFlowEntry(target.getFlowEntry()) : this
+                                    .installFlowEntry(target.getFlowEntry());
             if (status.isSuccess()) {
                 // Update Configuration database
                 target.setStatus(SUCCESS);