Search in sources :

Example 1 with WakeupOnNode

use of org.opendaylight.openflowplugin.learningswitch.WakeupOnNode in project openflowplugin by opendaylight.

the class LearningSwitchManagerMultiImpl method start.

/**
 * Starts learning switch.
 */
@Override
public void start() {
    LOG.debug("start() -->");
    FlowCommitWrapper dataStoreAccessor = new FlowCommitWrapperImpl(data);
    PacketInDispatcherImpl packetInDispatcher = new PacketInDispatcherImpl();
    MultipleLearningSwitchHandlerFacadeImpl learningSwitchHandler = new MultipleLearningSwitchHandlerFacadeImpl(dataStoreAccessor, packetProcessingService, packetInDispatcher);
    packetInRegistration = notificationService.registerNotificationListener(packetInDispatcher);
    WakeupOnNode wakeupListener = new WakeupOnNode();
    wakeupListener.setLearningSwitchHandler(learningSwitchHandler);
    final InstanceIdentifier<Table> instanceIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class).child(Table.class);
    final DataTreeIdentifier<Table> dataTreeIdentifier = new DataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
    dataTreeChangeListenerRegistration = data.registerDataTreeChangeListener(dataTreeIdentifier, wakeupListener);
    LOG.debug("start() <--");
}
Also used : DataTreeIdentifier(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier) Table(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table) FlowCommitWrapper(org.opendaylight.openflowplugin.learningswitch.FlowCommitWrapper) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) WakeupOnNode(org.opendaylight.openflowplugin.learningswitch.WakeupOnNode) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) FlowCommitWrapperImpl(org.opendaylight.openflowplugin.learningswitch.FlowCommitWrapperImpl)

Aggregations

DataTreeIdentifier (org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier)1 FlowCommitWrapper (org.opendaylight.openflowplugin.learningswitch.FlowCommitWrapper)1 FlowCommitWrapperImpl (org.opendaylight.openflowplugin.learningswitch.FlowCommitWrapperImpl)1 WakeupOnNode (org.opendaylight.openflowplugin.learningswitch.WakeupOnNode)1 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)1 Table (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table)1 Nodes (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)1