boolean isStatisticsPollingOn();
- void setIsStatisticsPollingOn(final boolean isStatisticsPollingOn);
+ void setStatisticsPollingOn(final boolean isStatisticsPollingOn);
/**
* Backward compatibility feature - exposing rpc for statistics polling (result is provided in form of async notification)
void setEchoReplyTimeout(long echoReplyTimeout);
- void setNotificationFlowRemovedOff(boolean isNotificationFlowRemovedOff);
+ void setFlowRemovedNotification(boolean isFlowRemovedNotificationOn);
void update(Map<String,Object> props);
*/
void initialize();
- void setIsNotificationFlowRemovedOff(boolean value);
+ void setFlowRemovedNotificationOn(boolean value);
- boolean getIsNotificationFlowRemovedOff();
+ boolean isFlowRemovedNotificationOn();
void setSkipTableFeatures(boolean skipTableFeatures);
default 60;
}
- leaf notification-flow-removed-off {
- description "Turning off flow removed notification";
+ leaf enable-flow-removed-notification {
+ description "Turning on flow removed notification";
type boolean;
- default "false";
+ default "true";
}
leaf skip-table-features {
#All parameters here will be persisted, however need to change it explicitly for
#each node of the cluster.
#Flag to turn flow removed notification on/off.
-#Flow removed notification is turned on by default. Default value false
-notification-flow-removed-off=false
+#Flow removed notification is turned on by default. Default value true
+enable-flow-removed-notification=true
#Ability to skip pulling and storing of large table features. These features are still
#available via rpc but if set to true then maintenance in DS will be omitted
#Turned off by default. Default value true
openflowPluginProvider.setNotificationProviderService(notificationService);
openflowPluginProvider.setNotificationPublishService(notificationPublishService);
openflowPluginProvider.setSwitchFeaturesMandatory(providerConfig.isSwitchFeaturesMandatory());
- openflowPluginProvider.setIsStatisticsPollingOn(providerConfig.isIsStatisticsPollingOn());
+ openflowPluginProvider.setFlowRemovedNotification(providerConfig.isEnableFlowRemovedNotification());
openflowPluginProvider.setIsStatisticsRpcEnabled(providerConfig.isIsStatisticsRpcEnabled());
openflowPluginProvider.setBarrierCountLimit(providerConfig.getBarrierCountLimit().getValue());
openflowPluginProvider.setBarrierInterval(providerConfig.getBarrierIntervalTimeoutLimit().getValue());
openflowPluginProvider.setEchoReplyTimeout(providerConfig.getEchoReplyTimeout().getValue());
- openflowPluginProvider.setNotificationFlowRemovedOff(providerConfig.isNotificationFlowRemovedOff());
+ openflowPluginProvider.setStatisticsPollingOn(providerConfig.isIsStatisticsPollingOn());
openflowPluginProvider.setClusteringSingletonServicesProvider(singletonServiceProvider);
openflowPluginProvider.setSkipTableFeatures(providerConfig.isSkipTableFeatures());
providerConfig.getThreadPoolMinThreads(),
providerConfig.getThreadPoolMaxThreads().getValue(),
providerConfig.getThreadPoolTimeout(),
- providerConfig.isNotificationFlowRemovedOff());
+ providerConfig.isEnableFlowRemovedNotification());
return openflowPluginProvider;
}
private boolean switchFeaturesMandatory = false;
private boolean isStatisticsPollingOn = true;
private boolean isStatisticsRpcEnabled;
- private boolean isNotificationFlowRemovedOff = false;
+ private boolean isFlowRemovedNotificationOn = true;
private boolean skipTableFeatures = true;
private final ThreadPoolExecutor threadPool;
}
@Override
- public void setIsStatisticsPollingOn(final boolean isStatisticsPollingOn) {
+ public void setStatisticsPollingOn(final boolean isStatisticsPollingOn) {
this.isStatisticsPollingOn = isStatisticsPollingOn;
}
}
@Override
- public void setNotificationFlowRemovedOff(boolean isNotificationFlowRemovedOff) {
- this.isNotificationFlowRemovedOff = isNotificationFlowRemovedOff;
+ public void setFlowRemovedNotification(boolean isFlowRemovedNotificationOn) {
+ this.isFlowRemovedNotificationOn = this.isFlowRemovedNotificationOn;
}
@Override
barrierInterval,
barrierCountLimit,
getMessageIntelligenceAgency(),
- isNotificationFlowRemovedOff,
+ isFlowRemovedNotificationOn,
singletonServicesProvider,
notificationPublishService,
hashedWheelTimer,
if(deviceManager != null) {
if (props.containsKey("notification-flow-removed-off")) {
- deviceManager.setIsNotificationFlowRemovedOff(Boolean.valueOf(props.get("notification-flow-removed-off").toString()));
+ deviceManager.setFlowRemovedNotificationOn(Boolean.valueOf(props.get("enable-flow-removed-notification").toString()));
}
if (props.containsKey("skip-table-features")) {
deviceManager.setSkipTableFeatures(Boolean.valueOf(props.get("skip-table-features").toString()));
final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved flowRemovedNotification =
flowRemovedTranslator.translate(flowRemoved, deviceInfo, null);
- if(!deviceManager.getIsNotificationFlowRemovedOff()) {
+ if(deviceManager.isFlowRemovedNotificationOn()) {
// Trigger off a notification
notificationPublishService.offerNotification(flowRemovedNotification);
} else if(LOG.isDebugEnabled()) {
- LOG.debug("For nodeId={} isNotificationFlowRemovedOff={}", getDeviceInfo().getLOGValue(), deviceManager.getIsNotificationFlowRemovedOff());
+ LOG.debug("For nodeId={} isFlowRemovedNotificationOn={}", getDeviceInfo().getLOGValue(), deviceManager.isFlowRemovedNotificationOn());
}
final ItemLifecycleListener itemLifecycleListener = flowLifeCycleKeeper.getItemLifecycleListener();
private final long globalNotificationQuota;
private final boolean switchFeaturesMandatory;
- private boolean isNotificationFlowRemovedOff;
+ private boolean isFlowRemovedNotificationOn;
private boolean skipTableFeatures;
private static final int SPY_RATE = 10;
final long barrierInterval,
final int barrierCountLimit,
final MessageSpy messageSpy,
- final boolean isNotificationFlowRemovedOff,
+ final boolean isFlowRemovedNotificationOn,
final ClusterSingletonServiceProvider singletonServiceProvider,
final NotificationPublishService notificationPublishService,
final HashedWheelTimer hashedWheelTimer,
this.switchFeaturesMandatory = switchFeaturesMandatory;
this.globalNotificationQuota = globalNotificationQuota;
- this.isNotificationFlowRemovedOff = isNotificationFlowRemovedOff;
+ this.isFlowRemovedNotificationOn = isFlowRemovedNotificationOn;
this.skipTableFeatures = skipTableFeatures;
this.convertorExecutor = convertorExecutor;
this.hashedWheelTimer = hashedWheelTimer;
}
@Override
- public void setIsNotificationFlowRemovedOff(boolean isNotificationFlowRemovedOff) {
- this.isNotificationFlowRemovedOff = isNotificationFlowRemovedOff;
+ public void setFlowRemovedNotificationOn(boolean isNotificationFlowRemovedOff) {
+ this.isFlowRemovedNotificationOn = isNotificationFlowRemovedOff;
}
@Override
- public boolean getIsNotificationFlowRemovedOff() {
- return this.isNotificationFlowRemovedOff;
+ public boolean isFlowRemovedNotificationOn() {
+ return this.isFlowRemovedNotificationOn;
}
.child(Table.class, new TableKey((short) 0))
.child(Flow.class, new FlowKey(new FlowId("ut-ofp:f456")));
- Mockito.when(deviceManager.getIsNotificationFlowRemovedOff()).thenReturn(true);
+ Mockito.when(deviceManager.isFlowRemovedNotificationOn()).thenReturn(true);
deviceContext.setNotificationPublishService(mockedNotificationPublishService);
deviceContext.processFlowRemovedMessage(flowRemovedBld.build());
Mockito.verify(itemLifecycleListener).onRemoved(flowToBeRemovedPath);
- Mockito.verify(mockedNotificationPublishService, Mockito.never()).offerNotification(Matchers.any(Notification.class));
- Mockito.when(deviceManager.getIsNotificationFlowRemovedOff()).thenReturn(false);
+ Mockito.when(deviceManager.isFlowRemovedNotificationOn()).thenReturn(false);
deviceContext.processFlowRemovedMessage(flowRemovedBld.build());
Mockito.verify(mockedNotificationPublishService).offerNotification(Matchers.any(Notification.class));