<version>0.3.0-SNAPSHOT</version>
</parent>
<groupId>org.opendaylight.openflowplugin.applications</groupId>
- <artifactId>old-notification-supplier</artifactId>
+ <artifactId>notification-supplier</artifactId>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<configuration>
<artifacts>
<artifact>
- <file>${project.build.directory}/classes/initial/73-old-notification-supplier.xml</file>
+ <file>${project.build.directory}/classes/initial/73-notification-supplier.xml</file>
<type>xml</type>
<classifier>config</classifier>
</artifact>
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
/**
* Project module provider interface representation
*/
-public interface OldNotifProvider extends AutoCloseable {
+public interface NotificationProvider extends AutoCloseable {
/**
- * Method is responsible for initialization and registration all Old Notification Suppliers
+ * Method is responsible for initialization and registration all Notification Suppliers
* followed by settings from ConfigSubsystem
*/
void start();
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import java.util.List;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.NodeConnectorNotificationSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.NodeNotificationSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.FlowNotificationSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.GroupNotificationSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.MeterNotificationSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.FlowStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.FlowTableStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.GroupStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.MeterStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.NodeConnectorStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat.QueueStatNotifSupplierImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.tools.OldNotifProviderConfig;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.NodeConnectorNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.NodeNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.FlowNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.GroupNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.MeterNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.FlowStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.FlowTableStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.GroupStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.MeterStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.NodeConnectorStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat.QueueStatNotificationSupplierImpl;
+import org.opendaylight.openflowplugin.applications.notification.supplier.tools.NotificationProviderConfig;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
/**
* Provider Implementation
*/
-public class OldNotifProviderImpl implements OldNotifProvider {
+public class NotificationProviderImpl implements NotificationProvider {
private final DataBroker db;
- private final OldNotifProviderConfig config;
+ private final NotificationProviderConfig config;
private final NotificationProviderService nps;
/* Supplier List property help for easy close method implementation and testing */
- private List<OldNotifSupplierDefinition<?>> supplierList;
- private OldNotifSupplierForItemRoot<FlowCapableNode, NodeUpdated, NodeRemoved> nodeSupp;
- private OldNotifSupplierForItemRoot<FlowCapableNodeConnector, NodeConnectorUpdated, NodeConnectorRemoved> connectorSupp;
- private OldNotifSupplierForItem<Flow, FlowAdded, FlowUpdated, FlowRemoved> flowSupp;
- private OldNotifSupplierForItem<Meter, MeterAdded, MeterUpdated, MeterRemoved> meterSupp;
- private OldNotifSupplierForItem<Group, GroupAdded, GroupUpdated, GroupRemoved> groupSupp;
- private OldNotifSupplierForItemStat<FlowCapableNodeConnectorStatistics, NodeConnectorStatisticsUpdate> connectorStatSupp;
- private OldNotifSupplierForItemStat<FlowStatistics, FlowsStatisticsUpdate> flowStatSupp;
- private OldNotifSupplierForItemStat<FlowTableStatistics, FlowTableStatisticsUpdate> flowTableStatSupp;
- private OldNotifSupplierForItemStat<MeterStatistics, MeterStatisticsUpdated> meterStatSupp;
- private OldNotifSupplierForItemStat<GroupStatistics, GroupStatisticsUpdated> groupStatSupp;
- private OldNotifSupplierForItemStat<FlowCapableNodeConnectorQueueStatisticsData, QueueStatisticsUpdate> queueStatSupp;
+ private List<NotificationSupplierDefinition<?>> supplierList;
+ private NotificationSupplierForItemRoot<FlowCapableNode, NodeUpdated, NodeRemoved> nodeSupp;
+ private NotificationSupplierForItemRoot<FlowCapableNodeConnector, NodeConnectorUpdated, NodeConnectorRemoved> connectorSupp;
+ private NotificationSupplierForItem<Flow, FlowAdded, FlowUpdated, FlowRemoved> flowSupp;
+ private NotificationSupplierForItem<Meter, MeterAdded, MeterUpdated, MeterRemoved> meterSupp;
+ private NotificationSupplierForItem<Group, GroupAdded, GroupUpdated, GroupRemoved> groupSupp;
+ private NotificationSupplierForItemStat<FlowCapableNodeConnectorStatistics, NodeConnectorStatisticsUpdate> connectorStatSupp;
+ private NotificationSupplierForItemStat<FlowStatistics, FlowsStatisticsUpdate> flowStatSupp;
+ private NotificationSupplierForItemStat<FlowTableStatistics, FlowTableStatisticsUpdate> flowTableStatSupp;
+ private NotificationSupplierForItemStat<MeterStatistics, MeterStatisticsUpdated> meterStatSupp;
+ private NotificationSupplierForItemStat<GroupStatistics, GroupStatisticsUpdated> groupStatSupp;
+ private NotificationSupplierForItemStat<FlowCapableNodeConnectorQueueStatisticsData, QueueStatisticsUpdate> queueStatSupp;
/**
* Provider constructor set all needed final parameters
* @param nps - notifProviderService
* @param db - dataBroker
*/
- public OldNotifProviderImpl(final OldNotifProviderConfig config,
+ public NotificationProviderImpl(final NotificationProviderConfig config,
final NotificationProviderService nps, final DataBroker db) {
this.config = Preconditions.checkNotNull(config);
this.db = Preconditions.checkNotNull(db);
flowSupp = config.isFlowSupport() ? new FlowNotificationSupplierImpl(nps, db) : null;
meterSupp = config.isMeterSupport() ? new MeterNotificationSupplierImpl(nps, db) : null;
groupSupp = config.isGroupSupport() ? new GroupNotificationSupplierImpl(nps, db) : null;
- connectorStatSupp = config.isNodeConnectorStatSupport() ? new NodeConnectorStatNotifSupplierImpl(nps, db) : null;
- flowStatSupp = config.isFlowStatSupport() ? new FlowStatNotifSupplierImpl(nps, db) : null;
- flowTableStatSupp = config.isFlowTableStatSupport() ? new FlowTableStatNotifSupplierImpl(nps, db) : null;
- meterStatSupp = config.isMeterStatSupport() ? new MeterStatNotifSupplierImpl(nps, db) : null;
- groupStatSupp = config.isGroupStatSupport() ? new GroupStatNotifSupplierImpl(nps, db) : null;
- queueStatSupp = config.isQueueStatSupport() ? new QueueStatNotifSupplierImpl(nps, db) : null;
+ connectorStatSupp = config.isNodeConnectorStatSupport() ? new NodeConnectorStatNotificationSupplierImpl(nps, db) : null;
+ flowStatSupp = config.isFlowStatSupport() ? new FlowStatNotificationSupplierImpl(nps, db) : null;
+ flowTableStatSupp = config.isFlowTableStatSupport() ? new FlowTableStatNotificationSupplierImpl(nps, db) : null;
+ meterStatSupp = config.isMeterStatSupport() ? new MeterStatNotificationSupplierImpl(nps, db) : null;
+ groupStatSupp = config.isGroupStatSupport() ? new GroupStatNotificationSupplierImpl(nps, db) : null;
+ queueStatSupp = config.isQueueStatSupport() ? new QueueStatNotificationSupplierImpl(nps, db) : null;
supplierList = new ArrayList<>(Arrays.asList(nodeSupp, connectorSupp, flowSupp, meterSupp, groupSupp,
connectorStatSupp, flowStatSupp, flowTableStatSupp, meterStatSupp, groupStatSupp, queueStatSupp));
@Override
public void close() throws Exception {
- for (OldNotifSupplierDefinition<?> supplier : supplierList) {
+ for (NotificationSupplierDefinition<?> supplier : supplierList) {
if (supplier != null) {
supplier.close();
supplier = null;
}
@VisibleForTesting
- List<OldNotifSupplierDefinition<?>> getSupplierList() {
+ List<NotificationSupplierDefinition<?>> getSupplierList() {
return supplierList;
}
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
- * Default definition for every Old Notification Supplier. Migration from old notification
+ * Default definition for every Notification Supplier. Migration from notification
* to {@link org.opendaylight.controller.md.sal.binding.api.DataChangeListener} has one
* keyed component - WildCarded Path which represent a changes checker in DataStoreTreeNode
*
* @param <O> - {@link DataObject} represent Data Tree Item from DataStore
*/
-public interface OldNotifSupplierDefinition<O extends DataObject> extends AutoCloseable, DataChangeListener {
+public interface NotificationSupplierDefinition<O extends DataObject> extends AutoCloseable, DataChangeListener {
/**
* Method return wildCardPath for Listener registration and for identify
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.Notification;
/**
- * Supplier Item contracts definition for every Old Notifications. All items are described
+ * Supplier Item contracts definition for every Notification. All items are described
* by three notifications. Notification for Create, Update and Delete. So interface
* has to contain three methods for every Notification.
*
* @param <U> - Update notification
* @param <D> - Delete notification
*/
-public interface OldNotifSupplierForItem<O extends DataObject,
+public interface NotificationSupplierForItem<O extends DataObject,
C extends Notification,
U extends Notification,
D extends Notification>
- extends OldNotifSupplierDefinition<O> {
+ extends NotificationSupplierDefinition<O> {
/**
* Method produces relevant addItem kind of {@link Notification} from
* data tree item identified by {@link InstanceIdentifier} path.
- *
+ *
* @param o - Data Tree Item object
* @param path - Identifier of Data Tree Item
* @return {@link Notification} - relevant API contract Notification
/**
* Method produces relevant updateItem kind of {@link Notification} from
* data tree item identified by {@link InstanceIdentifier} path.
- *
+ *
* @param o - Data Tree Item object
* @param path - Identifier of Data Tree Item
* @return {@link Notification} - relevant API contract Notification
/**
* Method produces relevant deleteItem kind of {@link Notification} from
* path {@link InstanceIdentifier} to deleted item.
- *
+ *
* @param path - Identifier of Data Tree Item
* @return {@link Notification} - relevant API contract Notification
*/
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.Notification;
/**
- * Supplier Root Item contracts definition for every Old Notifications. All root items
+ * Supplier Root Item contracts definition for every Notification. All root items
* are described by two notifications. Notification for Create and Delete.
* So interface has to contain two methods for relevant Notification.
*
* @param <C> - Create notification
* @param <D> - Delete notification
*/
-public interface OldNotifSupplierForItemRoot<O extends DataObject,
+public interface NotificationSupplierForItemRoot<O extends DataObject,
C extends Notification,
D extends Notification>
- extends OldNotifSupplierDefinition<O> {
+ extends NotificationSupplierDefinition<O> {
/**
* Method produces relevant addItem kind of {@link Notification} from
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
* @param <O> - data tree item Object
* @param <N> - Statistics Notification
*/
-public interface OldNotifSupplierForItemStat<O extends DataObject, N extends Notification>
- extends OldNotifSupplierDefinition<O> {
+public interface NotificationSupplierForItemStat<O extends DataObject, N extends Notification>
+ extends NotificationSupplierDefinition<O> {
/**
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifSupplierDefinition;
+import org.opendaylight.openflowplugin.applications.notification.supplier.NotificationSupplierDefinition;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
*
* @param <O> - data tree item Object extends {@link DataObject}
*/
-public abstract class AbstractNotifSupplierBase<O extends DataObject> implements
- OldNotifSupplierDefinition<O> {
+public abstract class AbstractNotificationSupplierBase<O extends DataObject> implements
+ NotificationSupplierDefinition<O> {
protected final Class<O> clazz;
private ListenerRegistration<DataChangeListener> listenerRegistration;
* @param db - {@link DataBroker}
* @param clazz - API contract class extended {@link DataObject}
*/
- public AbstractNotifSupplierBase(final DataBroker db, final Class<O> clazz) {
+ public AbstractNotificationSupplierBase(final DataBroker db, final Class<O> clazz) {
Preconditions.checkArgument(db != null, "DataBroker can not be null!");
listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, getWildCardPath(), this,
DataChangeScope.BASE);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import com.google.common.base.Preconditions;
import java.util.Map.Entry;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifSupplierForItemRoot;
+import org.opendaylight.openflowplugin.applications.notification.supplier.NotificationSupplierForItemRoot;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.Notification;
/**
- * Class is package protected abstract implementation for all Old Root Items
+ * Class is package protected abstract implementation for all Root Items
* Notification Suppliers
*
* @param <O> - data tree item Object
* @param <C> - Create notification
* @param <D> - Delete notification
*/
-abstract class AbstractNofitSupplierFoItemRoot<O extends DataObject,
+abstract class AbstractNotificationSupplierForItemRoot<O extends DataObject,
C extends Notification,
D extends Notification>
- extends AbstractNotifSupplierBase<O>
- implements OldNotifSupplierForItemRoot<O, C, D> {
+ extends AbstractNotificationSupplierBase<O>
+ implements NotificationSupplierForItemRoot<O, C, D> {
- private final NotificationProviderService notifProviderService;
+ private final NotificationProviderService notificationProviderService;
/**
* Default constructor for all Root Item Notification Supplier implementation
*
- * @param notifProviderService - notification publisher
+ * @param notificationProviderService - notification publisher
* @param db - DataBroker for DataChangeEvent registration
* @param clazz - Statistics Notification Class
*/
- public AbstractNofitSupplierFoItemRoot(final NotificationProviderService notifProviderService, final DataBroker db,
+ public AbstractNotificationSupplierForItemRoot(final NotificationProviderService notificationProviderService, final DataBroker db,
final Class<O> clazz) {
super(db, clazz);
- this.notifProviderService = Preconditions.checkNotNull(notifProviderService);
+ this.notificationProviderService = Preconditions.checkNotNull(notificationProviderService);
}
@Override
final InstanceIdentifier<O> ii = createDataObj.getKey().firstIdentifierOf(clazz);
final C notif = createNotification((O) createDataObj.getValue(), ii);
if (notif != null) {
- notifProviderService.publish(notif);
+ notificationProviderService.publish(notif);
}
}
}
if (clazz.isAssignableFrom(deleteDataPath.getTargetType())) {
final D notif = deleteNotification(deleteDataPath.firstIdentifierOf(clazz));
if (notif != null) {
- notifProviderService.publish(notif);
+ notificationProviderService.publish(notif);
}
}
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
* and {@link NodeConnectorUpdated} and {@link NodeConnectorRemoved} notifications.
*/
public class NodeConnectorNotificationSupplierImpl extends
- AbstractNofitSupplierFoItemRoot<FlowCapableNodeConnector, NodeConnectorUpdated, NodeConnectorRemoved> {
+ AbstractNotificationSupplierForItemRoot<FlowCapableNodeConnector, NodeConnectorUpdated, NodeConnectorRemoved> {
private static final InstanceIdentifier<FlowCapableNodeConnector> wildCardedInstanceIdent = getNodeWildII().child(NodeConnector.class).augmentation(FlowCapableNodeConnector.class);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
* and {@link NodeUpdated} and {@link NodeRemoved} notifications.
*/
public class NodeNotificationSupplierImpl extends
- AbstractNofitSupplierFoItemRoot<FlowCapableNode, NodeUpdated, NodeRemoved> {
+ AbstractNotificationSupplierForItemRoot<FlowCapableNode, NodeUpdated, NodeRemoved> {
private static final InstanceIdentifier<FlowCapableNode> wildCardedInstanceIdent = getNodeWildII().augmentation(FlowCapableNode.class);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import com.google.common.base.Preconditions;
import java.util.Map.Entry;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifSupplierForItem;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.AbstractNotifSupplierBase;
+import org.opendaylight.openflowplugin.applications.notification.supplier.NotificationSupplierForItem;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.AbstractNotificationSupplierBase;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.Notification;
* @param <U> - Update notification
* @param <D> - Delete notification
*/
-abstract class AbstractNotifSupplierForItem<O extends DataObject,
+abstract class AbstractNotificationSupplierForItem<O extends DataObject,
C extends Notification,
U extends Notification,
D extends Notification>
- extends AbstractNotifSupplierBase<O>
- implements OldNotifSupplierForItem<O, C, U, D> {
+ extends AbstractNotificationSupplierBase<O>
+ implements NotificationSupplierForItem<O, C, U, D> {
- private final NotificationProviderService notifProviderService;
+ private final NotificationProviderService notificationProviderService;
/**
* Default constructor for all item Notification Supplier implementation
* @param db - DataBroker for DataChangeEvent registration
* @param clazz - Statistics Notification Class
*/
- public AbstractNotifSupplierForItem(final NotificationProviderService notifProviderService, final DataBroker db,
+ public AbstractNotificationSupplierForItem(final NotificationProviderService notifProviderService, final DataBroker db,
final Class<O> clazz) {
super(db, clazz);
- this.notifProviderService = Preconditions.checkNotNull(notifProviderService);
+ this.notificationProviderService = Preconditions.checkNotNull(notifProviderService);
}
@Override
final InstanceIdentifier<O> ii = createDataObj.getKey().firstIdentifierOf(clazz);
final C notif = createNotification((O) createDataObj.getValue(), ii);
if (notif != null) {
- notifProviderService.publish(notif);
+ notificationProviderService.publish(notif);
}
}
}
final InstanceIdentifier<O> ii = updateDataObj.getKey().firstIdentifierOf(clazz);
final U notif = updateNotification((O) updateDataObj.getValue(), ii);
if (notif != null) {
- notifProviderService.publish(notif);
+ notificationProviderService.publish(notif);
}
}
}
if (clazz.isAssignableFrom(deleteDataPath.getTargetType())) {
final D notif = deleteNotification(deleteDataPath.firstIdentifierOf(clazz));
if (notif != null) {
- notifProviderService.publish(notif);
+ notificationProviderService.publish(notif);
}
}
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
* and {@link FlowAdded}, {@link FlowUpdated} and {@link FlowRemoved} notifications.
*/
public class FlowNotificationSupplierImpl extends
- AbstractNotifSupplierForItem<Flow, FlowAdded, FlowUpdated, FlowRemoved> {
+ AbstractNotificationSupplierForItem<Flow, FlowAdded, FlowUpdated, FlowRemoved> {
private static final InstanceIdentifier<Flow> wildCardedInstanceIdent = getNodeWildII().augmentation(FlowCapableNode.class).child(Table.class).child(Flow.class);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
* and {@link GroupAdded}, {@link GroupUpdated} and {@link GroupRemoved} notifications.
*/
public class GroupNotificationSupplierImpl extends
- AbstractNotifSupplierForItem<Group, GroupAdded, GroupUpdated, GroupRemoved> {
+ AbstractNotificationSupplierForItem<Group, GroupAdded, GroupUpdated, GroupRemoved> {
private static final InstanceIdentifier<Group> wildCardedInstanceIdent = getNodeWildII().augmentation(FlowCapableNode.class).child(Group.class);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import com.google.common.base.Preconditions;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
* and {@link MeterAdded}, {@link MeterUpdated} and {@link MeterRemoved} notifications.
*/
public class MeterNotificationSupplierImpl extends
- AbstractNotifSupplierForItem<Meter, MeterAdded, MeterUpdated, MeterRemoved> {
+ AbstractNotificationSupplierForItem<Meter, MeterAdded, MeterUpdated, MeterRemoved> {
private static final InstanceIdentifier<Meter> wildCardedInstanceIdent = getNodeWildII().augmentation(FlowCapableNode.class).child(Meter.class);
/**
* Package contains OF Items (Flow, Group, Meter ...) notification listener/supplier implementations
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
\ No newline at end of file
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
\ No newline at end of file
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Map.Entry;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifSupplierForItemStat;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.AbstractNotifSupplierBase;
+import org.opendaylight.openflowplugin.applications.notification.supplier.NotificationSupplierForItemStat;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.AbstractNotificationSupplierBase;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.Notification;
* @param <O> - Statistics {@link DataObject}
* @param <N> - Statistics Notification
*/
-abstract class AbstractNotifSupplierForItemStat<O extends DataObject,
+abstract class AbstractNotificationSupplierForItemStat<O extends DataObject,
N extends Notification>
- extends AbstractNotifSupplierBase<O>
- implements OldNotifSupplierForItemStat<O, N> {
+ extends AbstractNotificationSupplierBase<O>
+ implements NotificationSupplierForItemStat<O, N> {
private final NotificationProviderService notifProviderService;
* @param db - DataBroker for DataChangeEvent registration
* @param clazz - Statistics Notification Class
*/
- public AbstractNotifSupplierForItemStat(final NotificationProviderService notifProviderService,
+ public AbstractNotificationSupplierForItemStat(final NotificationProviderService notifProviderService,
final DataBroker db, final Class<O> clazz) {
super(db, clazz);
this.notifProviderService = Preconditions.checkNotNull(notifProviderService);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link FlowStatistics} data object
* and {@link FlowsStatisticsUpdate} notification.
*/
-public class FlowStatNotifSupplierImpl extends AbstractNotifSupplierForItemStat<FlowStatistics, FlowsStatisticsUpdate> {
+public class FlowStatNotificationSupplierImpl extends AbstractNotificationSupplierForItemStat<FlowStatistics, FlowsStatisticsUpdate> {
private static final InstanceIdentifier<FlowStatistics> wildCardedInstanceIdent =
getNodeWildII().augmentation(FlowCapableNode.class).child(Table.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public FlowStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public FlowStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, FlowStatistics.class);
}
builder.setId(getNodeId(path));
builder.setMoreReplies(Boolean.FALSE);
// NOTE : fix if it needs, but we have to ask DataStore for the NodeConnector list
- builder.setNodeConnector(Collections.<NodeConnector> emptyList());
+ builder.setNodeConnector(Collections.<NodeConnector>emptyList());
builder.setFlowAndStatisticsMapList(Collections.singletonList(fsmlBuilder.build()));
return builder.build();
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link FlowTableStatistics} data object
* and {@link FlowTableStatisticsUpdate} notification.
*/
-public class FlowTableStatNotifSupplierImpl extends
- AbstractNotifSupplierForItemStat<FlowTableStatistics, FlowTableStatisticsUpdate> {
+public class FlowTableStatNotificationSupplierImpl extends
+ AbstractNotificationSupplierForItemStat<FlowTableStatistics, FlowTableStatisticsUpdate> {
private static final InstanceIdentifier<FlowTableStatistics> wildCardedInstanceIdent =
getNodeWildII().augmentation(FlowCapableNode.class).child(Table.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public FlowTableStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public FlowTableStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, FlowTableStatistics.class);
}
builder.setId(getNodeId(path));
builder.setMoreReplies(Boolean.FALSE);
// NOTE : fix if it needs, but we have to ask DataStore for the NodeConnector list
- builder.setNodeConnector(Collections.<NodeConnector> emptyList());
+ builder.setNodeConnector(Collections.<NodeConnector>emptyList());
builder.setFlowTableAndStatisticsMap(Collections.singletonList(ftsmBuilder.build()));
return builder.build();
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link GroupStatistics} data object
* and {@link GroupStatisticsUpdated} notification.
*/
-public class GroupStatNotifSupplierImpl extends
- AbstractNotifSupplierForItemStat<GroupStatistics, GroupStatisticsUpdated> {
+public class GroupStatNotificationSupplierImpl extends
+ AbstractNotificationSupplierForItemStat<GroupStatistics, GroupStatisticsUpdated> {
private static final InstanceIdentifier<GroupStatistics> wildCardedInstanceIdent =
getNodeWildII().augmentation(FlowCapableNode.class).child(Group.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public GroupStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public GroupStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, GroupStatistics.class);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link MeterStatistics} data object
* and {@link MeterStatisticsUpdated} notification.
*/
-public class MeterStatNotifSupplierImpl extends
- AbstractNotifSupplierForItemStat<MeterStatistics, MeterStatisticsUpdated> {
+public class MeterStatNotificationSupplierImpl extends
+ AbstractNotificationSupplierForItemStat<MeterStatistics, MeterStatisticsUpdated> {
private static final InstanceIdentifier<MeterStatistics> wildCardedInstanceIdent =
getNodeWildII().augmentation(FlowCapableNode.class).child(Meter.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public MeterStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public MeterStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, MeterStatistics.class);
}
builder.setId(getNodeId(path));
builder.setMoreReplies(Boolean.FALSE);
// TODO : fix if it needs, but we have to ask DataStore for the NodeConnector list
- builder.setNodeConnector(Collections.<NodeConnector> emptyList());
+ builder.setNodeConnector(Collections.<NodeConnector>emptyList());
builder.setMeterStats(Collections.singletonList(new MeterStatsBuilder(o).build()));
return builder.build();
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link FlowCapableNodeConnectorStatistics} data object
* and {@link NodeConnectorStatisticsUpdate} notification.
*/
-public class NodeConnectorStatNotifSupplierImpl extends
- AbstractNotifSupplierForItemStat<FlowCapableNodeConnectorStatistics, NodeConnectorStatisticsUpdate> {
+public class NodeConnectorStatNotificationSupplierImpl extends
+ AbstractNotificationSupplierForItemStat<FlowCapableNodeConnectorStatistics, NodeConnectorStatisticsUpdate> {
private static final InstanceIdentifier<FlowCapableNodeConnectorStatistics> wildCardedInstanceIdent =
getNodeWildII().child(NodeConnector.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public NodeConnectorStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public NodeConnectorStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, FlowCapableNodeConnectorStatistics.class);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import com.google.common.base.Preconditions;
import java.util.Collections;
* Implementation define a contract between {@link FlowCapableNodeConnectorQueueStatisticsData} data object
* and {@link QueueStatisticsUpdate} notification.
*/
-public class QueueStatNotifSupplierImpl extends
- AbstractNotifSupplierForItemStat<FlowCapableNodeConnectorQueueStatisticsData, QueueStatisticsUpdate> {
+public class QueueStatNotificationSupplierImpl extends
+ AbstractNotificationSupplierForItemStat<FlowCapableNodeConnectorQueueStatisticsData, QueueStatisticsUpdate> {
private static final InstanceIdentifier<FlowCapableNodeConnectorQueueStatisticsData> wildCardedInstanceIdent =
getNodeWildII().child(NodeConnector.class)
* @param notifProviderService - {@link NotificationProviderService}
* @param db - {@link DataBroker}
*/
- public QueueStatNotifSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+ public QueueStatNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
super(notifProviderService, db, FlowCapableNodeConnectorQueueStatisticsData.class);
}
/**
* Package contains OF Statistics Items (Flow, Group, Meter ...) notification listener/supplier implementations
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
\ No newline at end of file
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
\ No newline at end of file
/**
* Package contains notification listener/supplier implementations
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
\ No newline at end of file
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
\ No newline at end of file
/**
* Base project package for a module Provider and base notification listener/supplier interface
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
\ No newline at end of file
+package org.opendaylight.openflowplugin.applications.notification.supplier;
\ No newline at end of file
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.tools;
+package org.opendaylight.openflowplugin.applications.notification.supplier.tools;
/**
* Class is designed as ConfigSubsitem settings holder
*/
-public class OldNotifProviderConfig {
+public class NotificationProviderConfig {
private final boolean flowSupport;
private final boolean meterSupport;
private final boolean queueStatSupport;
private final boolean flowStatSupport;
- private OldNotifProviderConfig(final OldNotifProviderConfigBuilder builder) {
+ private NotificationProviderConfig(final NotificationProviderConfigBuilder builder) {
this.flowSupport = builder.isFlowSupport();
this.meterSupport = builder.isMeterSupport();
this.groupSupport = builder.isGroupSupport();
return flowStatSupport;
}
- public static OldNotifProviderConfigBuilder builder() {
- return new OldNotifProviderConfigBuilder();
+ public static NotificationProviderConfigBuilder builder() {
+ return new NotificationProviderConfigBuilder();
}
- public static class OldNotifProviderConfigBuilder {
+ public static class NotificationProviderConfigBuilder {
private boolean flowSupport;
private boolean meterSupport;
private boolean groupSupport;
this.flowStatSupport = flowStatSupport;
}
- public OldNotifProviderConfig build() {
- return new OldNotifProviderConfig(this);
+ public NotificationProviderConfig build() {
+ return new NotificationProviderConfig(this);
}
}
}
/**
* Package for all internal helper classes.
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.tools;
\ No newline at end of file
+package org.opendaylight.openflowplugin.applications.notification.supplier.tools;
\ No newline at end of file
--- /dev/null
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.notification.supplier.rev150820;
+public class NotifModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.notification.supplier.rev150820.AbstractNotifModule {
+ public NotifModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+ super(identifier, dependencyResolver);
+ }
+
+ public NotifModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.notification.supplier.rev150820.NotifModule oldModule, java.lang.AutoCloseable oldInstance) {
+ super(identifier, dependencyResolver, oldModule, oldInstance);
+ }
+
+ @Override
+ public void customValidation() {
+ // add custom validation form module attributes here.
+ }
+
+ @Override
+ public java.lang.AutoCloseable createInstance() {
+ // TODO:implement
+ throw new java.lang.UnsupportedOperationException();
+ }
+
+}
--- /dev/null
+/*
+* Generated file
+*
+* Generated from: yang module name: notification-supplier yang module local name: notification-supplier
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun May 22 10:45:47 IST 2016
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.notification.supplier.rev150820;
+public class NotifModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.notification.supplier.rev150820.AbstractNotifModuleFactory {
+
+}
<modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:applications:old-notification-supplier">prefix:old-notification-supplier</type>
- <name>old-notification-supplier</name>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:applications:notification-supplier">prefix:notification-supplier</type>
+ <name>notification-supplier</name>
<data-broker>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
<name>binding-data-broker</name>
<name>binding-notification-broker</name>
</notification-service>
- <old-notification-supplier-settings>
+ <notification-supplier-settings>
<!--<port-support>true</port-support>-->
<!--<flow-support>true</flow-support>-->
<meter-support>true</meter-support>
<meter-stat-support>false</meter-stat-support>
<queue-stat-support>false</queue-stat-support>
<flow-stat-support>false</flow-stat-support>
- </old-notification-supplier-settings>
+ </notification-supplier-settings>
</module>
</configuration>
<required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:applications:old-notification-supplier?module=old-notification-supplier&revision=2015-08-20</capability>
+ <capability>urn:opendaylight:params:xml:ns:yang:openflow:applications:notification-supplier?module=notification-supplier&revision=2015-08-20</capability>
<capability>urn:opendaylight:flow:inventory?module=flow-node-inventory&revision=2013-08-19</capability>
<capability>urn:opendaylight:inventory?module=opendaylight-inventory&revision=2013-08-19</capability>
<capability>urn:opendaylight:flow:types?module=opendaylight-flow-types&revision=2013-10-26</capability>
-module old-notification-supplier {
+module notification-supplier {
yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:openflow:applications:old-notification-supplier";
- prefix "old-notif";
+ namespace "urn:opendaylight:params:xml:ns:yang:openflow:applications:notification-supplier";
+ prefix "notification";
import config {prefix config; revision-date 2013-04-05;}
import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28;}
description
- "Translator tool for relevant wildcard path DataChangeEvent to Old Notifications.";
+ "Translator tool for relevant wildcard path DataChangeEvent to Notifications.";
revision "2015-08-20" {
description
"Initial revision";
}
- identity old-notification-supplier {
+ identity notification-supplier {
base "config:module-type";
- config:java-name-prefix OldNotif;
+ config:java-name-prefix Notif;
}
augment "/config:modules/config:module/config:configuration" {
- case old-notification-supplier {
- when "/config:modules/config:module/config:type = 'old-notification-supplier'";
+ case notification-supplier {
+ when "/config:modules/config:module/config:type = 'notification-supplier'";
container notification-service {
uses config:service-ref {
}
}
- container old-notification-supplier-settings {
+ container notification-supplier-settings {
leaf flow-support {
type boolean;
default true;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier;
+package org.opendaylight.openflowplugin.applications.notification.supplier;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.tools.OldNotifProviderConfig;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.tools.OldNotifProviderConfig.OldNotifProviderConfigBuilder;
+import org.opendaylight.openflowplugin.applications.notification.supplier.tools.NotificationProviderConfig;
+import org.opendaylight.openflowplugin.applications.notification.supplier.tools.NotificationProviderConfig.NotificationProviderConfigBuilder;
-public class OldNotifProviderImplTest {
+public class NotificationProviderImplTest {
private NotificationProviderService notificationProviderService;
- private OldNotifProviderConfig config;
+ private NotificationProviderConfig config;
private DataBroker dataBroker;
@Before
@Test
public void testCreateAllSuppliers() {
- final OldNotifProviderConfig config = createAllConfigSupplier();
- final OldNotifProviderImpl provider = new OldNotifProviderImpl(config, notificationProviderService, dataBroker);
+ final NotificationProviderConfig config = createAllConfigSupplier();
+ final NotificationProviderImpl provider = new NotificationProviderImpl(config, notificationProviderService, dataBroker);
provider.start();
- final List<OldNotifSupplierDefinition<?>> listSuppliers = provider.getSupplierList();
+ final List<NotificationSupplierDefinition<?>> listSuppliers = provider.getSupplierList();
int nrOfSuppliers = 0;
- for (final OldNotifSupplierDefinition<?> supplier : listSuppliers) {
+ for (final NotificationSupplierDefinition<?> supplier : listSuppliers) {
if (supplier != null) {
nrOfSuppliers++;
}
@Test
public void testCreateRootSuppliersOnly() {
- final OldNotifProviderConfig config = createNonConfigSupplier();
- final OldNotifProviderImpl provider = new OldNotifProviderImpl(config, notificationProviderService, dataBroker);
+ final NotificationProviderConfig config = createNonConfigSupplier();
+ final NotificationProviderImpl provider = new NotificationProviderImpl(config, notificationProviderService, dataBroker);
provider.start();
- final List<OldNotifSupplierDefinition<?>> listSuppliers = provider.getSupplierList();
+ final List<NotificationSupplierDefinition<?>> listSuppliers = provider.getSupplierList();
int nrOfSuppliers = 0;
- for (final OldNotifSupplierDefinition<?> supplier : listSuppliers) {
+ for (final NotificationSupplierDefinition<?> supplier : listSuppliers) {
if (supplier != null) {
nrOfSuppliers++;
}
assertEquals(2, nrOfSuppliers);
}
- private OldNotifProviderConfig createAllConfigSupplier() {
- final OldNotifProviderConfigBuilder builder = new OldNotifProviderConfigBuilder();
+ private NotificationProviderConfig createAllConfigSupplier() {
+ final NotificationProviderConfigBuilder builder = new NotificationProviderConfigBuilder();
builder.setFlowStatSupport(true);
builder.setFlowSupport(true);
builder.setFlowTableStatSupport(true);
return builder.build();
}
- private OldNotifProviderConfig createNonConfigSupplier() {
- final OldNotifProviderConfigBuilder builder = new OldNotifProviderConfigBuilder();
+ private NotificationProviderConfig createNonConfigSupplier() {
+ final NotificationProviderConfigBuilder builder = new NotificationProviderConfigBuilder();
builder.setFlowStatSupport(false);
builder.setFlowSupport(false);
builder.setFlowTableStatSupport(false);
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper;
import static org.mockito.Mockito.mock;
import java.util.Collections;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper;
import org.mockito.Matchers;
import org.mockito.Mockito;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupAdded;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterBuilder;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class FlowStatNotifSupplierImplTest {
+public class FlowStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final Short FLOW_TABLE_ID = 111;
private static final String FLOW_ID = "test-flow-111";
- private FlowStatNotifSupplierImpl notifSupplierImpl;
+ private FlowStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new FlowStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new FlowStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class FlowTableStatNotifSupplierImplTest {
+public class FlowTableStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final Short FLOW_TABLE_ID = 111;
private static final String FLOW_ID = "test-flow-111";
- private FlowTableStatNotifSupplierImpl notifSupplierImpl;
+ private FlowTableStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new FlowTableStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new FlowTableStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.NodeGroupStatistics;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class GroupStatNotifSupplierImplTest {
+public class GroupStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final Long FLOW_TABLE_ID = 111L;
- private GroupStatNotifSupplierImpl notifSupplierImpl;
+ private GroupStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new GroupStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new GroupStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterKey;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class MeterStatNotifSupplierImplTest {
+public class MeterStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final Long FLOW_METER_ID = 111L;
- private MeterStatNotifSupplierImpl notifSupplierImpl;
+ private MeterStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new MeterStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new MeterStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-public class NodeConnectorStatNotifSupplierImplTest {
+public class NodeConnectorStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final String FLOW_CODE_CONNECTOR_ID = "test-con-111";
- private NodeConnectorStatNotifSupplierImpl notifSupplierImpl;
+ private NodeConnectorStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new NodeConnectorStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new NodeConnectorStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.item.stat;
+package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.mockito.Matchers;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestChangeEventBuildHelper;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.impl.helper.TestSupplierVerifyHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestChangeEventBuildHelper;
+import org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper.TestSupplierVerifyHelper;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.queues.Queue;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
/**
*
*/
-public class QueueStatNotifSupplierImplTest {
+public class QueueStatNotificationSupplierImplTest {
private static final String FLOW_NODE_ID = "test-111";
private static final String FLOW_CODE_CONNECTOR_ID = "test-con-111";
- private QueueStatNotifSupplierImpl notifSupplierImpl;
+ private QueueStatNotificationSupplierImpl notifSupplierImpl;
private NotificationProviderService notifProviderService;
private DataBroker dataBroker;
public void initalization() {
notifProviderService = mock(NotificationProviderService.class);
dataBroker = mock(DataBroker.class);
- notifSupplierImpl = new QueueStatNotifSupplierImpl(notifProviderService, dataBroker);
+ notifSupplierImpl = new QueueStatNotificationSupplierImpl(notifProviderService, dataBroker);
TestSupplierVerifyHelper.verifyDataChangeRegistration(dataBroker);
}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.old.notification.supplier.rev150820;
-
-import com.google.common.base.Preconditions;
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifProvider;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.OldNotifProviderImpl;
-import org.opendaylight.openflowplugin.applications.old.notification.supplier.tools.OldNotifProviderConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Generated module introducer for OldNotificationSupplier Module class.
- */
-public class OldNotifModule extends AbstractOldNotifModule {
-
- static final Logger LOG = LoggerFactory.getLogger(OldNotifModule.class);
-
- private static final String LOAD_SETTINGS_XML_FAIL = "Load the xml ConfigSubsystem input value fail!";
- private static final boolean DEFAULT_ITEM_NOTIF_ALLOWED = true;
- private static final boolean DEFAULT_STAT_NOTIF_ALLOWED = false;
-
- /**
- * Module constructor
- *
- * @param identifier - {@link ModuleIdentifier}
- * @param dependencyResolver - {@link DependencyResolver}
- */
- public OldNotifModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- /**
- * Module constructor
- *
- * @param identifier - {@link ModuleIdentifier}
- * @param dependencyResolver - {@link DependencyResolver}
- * @param oldModule - {@link OldNotifModule}
- * @param oldInstance - {@link AutoCloseable}
- */
- public OldNotifModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver,
- final OldNotifModule oldModule, final AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.info("OldNotificationSupplier module initialization.");
- LOG.warn("OldNotificationSupplier module is marked like DEPRECATED. Modul could supplie old notification only for lithium release.");
- final OldNotifProviderConfig config = createConfig();
- final OldNotifProvider provider = new OldNotifProviderImpl(config, getNotificationServiceDependency(),
- getDataBrokerDependency());
- provider.start();
- LOG.info("StatisticsManager started successfully.");
-
- return new AutoCloseable() {
-
- @Override
- public void close() throws Exception {
- try {
- provider.close();
- } catch (final Exception e) {
- LOG.error("Unexpected error by stoppping Old-Notification-Supplier module", e);
- }
- LOG.info("Old-Notification-Supplier module stopped.");
- }
- };
- }
-
- /*
- * Help method for populating all ConfigSubsystem values to OldNotifProviderConfig immutable value holder.
- */
- private OldNotifProviderConfig createConfig() {
- final OldNotificationSupplierSettings settings = Preconditions.checkNotNull(getOldNotificationSupplierSettings());
- final OldNotifProviderConfig.OldNotifProviderConfigBuilder builder = OldNotifProviderConfig.builder();
- if (settings.getFlowSupport() != null) {
- builder.setFlowSupport(settings.getFlowSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " FlowSupport value is set to {} ", DEFAULT_ITEM_NOTIF_ALLOWED);
- builder.setFlowSupport(DEFAULT_ITEM_NOTIF_ALLOWED);
- }
-
- if (settings.getMeterSupport() != null) {
- builder.setMeterSupport(settings.getMeterSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " MeterSupport value is set to {} ", DEFAULT_ITEM_NOTIF_ALLOWED);
- builder.setMeterSupport(DEFAULT_ITEM_NOTIF_ALLOWED);
- }
- if (settings.getGroupSupport() != null) {
- builder.setGroupSupport(settings.getGroupSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " GroupSupport value is set to {} ", DEFAULT_ITEM_NOTIF_ALLOWED);
- builder.setGroupSupport(DEFAULT_ITEM_NOTIF_ALLOWED);
- }
- if (settings.getNodeConnectorStatSupport() != null) {
- builder.setNodeConnectorStatSupport(settings.getNodeConnectorStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " NodeConnectorStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setNodeConnectorStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- if (settings.getFlowTableStatSupport() != null) {
- builder.setFlowTableStatSupport(settings.getFlowTableStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " FlowTableStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setFlowTableStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- if (settings.getGroupStatSupport() != null) {
- builder.setGroupStatSupport(settings.getGroupStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " GroupStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setGroupStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- if (settings.getMeterStatSupport() != null) {
- builder.setMeterStatSupport(settings.getMeterStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " MeterStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setMeterStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- if (settings.getQueueStatSupport() != null) {
- builder.setQueueStatSupport(settings.getQueueStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " QueueStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setQueueStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- if (settings.getFlowStatSupport() != null) {
- builder.setFlowStatSupport(settings.getFlowStatSupport());
- } else {
- LOG.warn(LOAD_SETTINGS_XML_FAIL + " QueueStatSupport value is set to {} ", DEFAULT_STAT_NOTIF_ALLOWED);
- builder.setFlowStatSupport(DEFAULT_STAT_NOTIF_ALLOWED);
- }
- return builder.build();
- }
-}
+++ /dev/null
-/*
-* Generated file
-*
-* Generated from: yang module name: old-notification-supplier yang module local name: old-notification-supplier
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Aug 21 00:31:49 CEST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.old.notification.supplier.rev150820;
-
-public class OldNotifModuleFactory
- extends
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.applications.old.notification.supplier.rev150820.AbstractOldNotifModuleFactory {
-
-}
<module>of-switch-config-pusher</module>
<module>lldp-speaker</module>
<!-- deprecated apps -->
- <module>old-notification-supplier</module>
+ <module>notification-supplier</module>
<!-- nsf apps -->
<module>inventory-manager</module>
<module>statistics-manager</module>
</dependency>
<dependency>
<groupId>${project.groupId}.applications</groupId>
- <artifactId>old-notification-supplier</artifactId>
+ <artifactId>notification-supplier</artifactId>
<version>${project.version}</version>
<type>xml</type>
<classifier>config</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}.applications</groupId>
- <artifactId>old-notification-supplier</artifactId>
+ <artifactId>notification-supplier</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependency>
<dependency>
<groupId>org.opendaylight.openflowplugin.applications</groupId>
- <artifactId>old-notification-supplier</artifactId>
+ <artifactId>notification-supplier</artifactId>
<type>xml</type>
<classifier>config</classifier>
</dependency>
<dependency>
<groupId>org.opendaylight.openflowplugin.applications</groupId>
- <artifactId>old-notification-supplier</artifactId>
+ <artifactId>notification-supplier</artifactId>
</dependency>
</dependencies>
</project>
<configfile finalname="etc/opendaylight/karaf/71-bulk-o-matic.xml">mvn:org.opendaylight.openflowplugin.applications/bulk-o-matic/${project.version}/xml/config</configfile>
</feature>
- <feature name='odl-openflowplugin-old-notifications-li' description="OpenDaylight :: Openflow Plugin :: app old notifications supplier" version='${project.version}'>
+ <feature name='odl-openflowplugin-notifications-li' description="OpenDaylight :: Openflow Plugin :: app notifications supplier" version='${project.version}'>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version="${project.version}">odl-openflowplugin-nsf-model-li</feature>
- <bundle>mvn:org.opendaylight.openflowplugin.applications/old-notification-supplier/{{VERSION}}</bundle>
- <configfile finalname="etc/opendaylight/karaf/73-old-notification-supplier.xml">mvn:org.opendaylight.openflowplugin.applications/old-notification-supplier/{{VERSION}}/xml/config</configfile>
+ <bundle>mvn:org.opendaylight.openflowplugin.applications/notification-supplier/{{VERSION}}</bundle>
+ <configfile finalname="etc/opendaylight/karaf/73-notification-supplier.xml">mvn:org.opendaylight.openflowplugin.applications/notification-supplier/{{VERSION}}/xml/config</configfile>
</feature>
</features>