Fix minor bug in FRM proactive flow code path 70/770/1
authorAlessandro Boch <aboch@cisco.com>
Thu, 1 Aug 2013 19:03:51 +0000 (12:03 -0700)
committerAlessandro Boch <aboch@cisco.com>
Thu, 1 Aug 2013 19:11:32 +0000 (12:11 -0700)
ISSUE:
When proactive flows are installed on a switch
(as a result of user configuring the forwarding mode of the node to proactive)
in case switch fails to install any of these flows, the informational log still
reports that the proactive flow was succesfully installed.
CHANGE:
When calling addStaticFlowInternal() make sure to pass the restore flag as false

Change-Id: I7f1e85d40624a145c6d71bb1149b14c825894312
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java

index 2eaafb6..cade266 100644 (file)
@@ -1915,7 +1915,7 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou
 
         log.info("Forwarding mode for node {} set to {}", node, (proactive ? "proactive" : "reactive"));
         for (FlowConfig fc : defaultConfigs) {
-            Status status = (proactive) ? addStaticFlowInternal(fc, true) : removeStaticFlow(fc);
+            Status status = (proactive) ? addStaticFlowInternal(fc, false) : removeStaticFlow(fc);
             if (status.isSuccess()) {
                 log.info("{} Proactive Static flow: {}", (proactive ? "Installed" : "Removed"), fc.getName());
             } else {