Skip to content
Snippets Groups Projects
Commit 3d64ca37 authored by abat's avatar abat
Browse files

Merge into master from pull request #270:

support property setting to enable/disable flowRecoconcile (https://github.com/floodlight/floodlight/pull/270)
parents 93fc17be 60b363a0
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,10 @@ public class FlowReconcileManager ...@@ -33,6 +33,10 @@ public class FlowReconcileManager
* need to be reconciled with the current configuration of the controller. * need to be reconciled with the current configuration of the controller.
*/ */
protected ListenerDispatcher<OFType, IFlowReconcileListener> flowReconcileListeners; protected ListenerDispatcher<OFType, IFlowReconcileListener> flowReconcileListeners;
/** Config to enable or disable flowReconcile */
protected static final String EnableConfigKey = "enable";
protected boolean flowReconcileEnabled;
@Override @Override
public synchronized void addFlowReconcileListener(IFlowReconcileListener listener) { public synchronized void addFlowReconcileListener(IFlowReconcileListener listener) {
...@@ -65,6 +69,10 @@ public class FlowReconcileManager ...@@ -65,6 +69,10 @@ public class FlowReconcileManager
* @param ofmRcIn the ofm rc in * @param ofmRcIn the ofm rc in
*/ */
public void reconcileFlow(OFMatchReconcile ofmRcIn) { public void reconcileFlow(OFMatchReconcile ofmRcIn) {
if (!flowReconcileEnabled) {
return;
}
if (logger.isTraceEnabled()) { if (logger.isTraceEnabled()) {
logger.trace("Reconciling flow: {}", ofmRcIn.toString()); logger.trace("Reconciling flow: {}", ofmRcIn.toString());
} }
...@@ -145,6 +153,17 @@ public class FlowReconcileManager ...@@ -145,6 +153,17 @@ public class FlowReconcileManager
throws FloodlightModuleException { throws FloodlightModuleException {
flowReconcileListeners = flowReconcileListeners =
new ListenerDispatcher<OFType, IFlowReconcileListener>(); new ListenerDispatcher<OFType, IFlowReconcileListener>();
Map<String, String> configParam = context.getConfigParams(this);
String enableValue = configParam.get(EnableConfigKey);
// Set flowReconcile default to true
flowReconcileEnabled = true;
if (enableValue != null &&
enableValue.equalsIgnoreCase("false")) {
flowReconcileEnabled = false;
}
logger.debug("FlowReconcile is {}", flowReconcileEnabled);
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment