X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Ftest%2Fsal%2Fbinding%2Fit%2FNoficationTest.java;h=2f86ee4cc2e9e34c4db55b803b565f090c7962b5;hb=edb3b76df1fa27594d5f9ee368d737576b0b38f8;hp=fdae91670c74ccd4ac5498f5bc4cd45ce2582e17;hpb=6b5e1e50d209999f53a32ae44e9a7c03a79e499c;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java index fdae91670c..2f86ee4cc2 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/NoficationTest.java @@ -5,16 +5,29 @@ import static org.junit.Assert.assertNotNull; import java.math.BigInteger; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.junit.Before; import org.junit.Test; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; -import org.opendaylight.controller.sal.binding.api.*; -import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.*; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality; +import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; +import org.opendaylight.controller.sal.binding.api.NotificationProviderService; +import org.opendaylight.controller.sal.binding.api.NotificationService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAddedBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener; +import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.NotificationListener; +import org.opendaylight.yangtools.yang.binding.RpcService; public class NoficationTest extends AbstractTest { @@ -86,16 +99,36 @@ public class NoficationTest extends AbstractTest { * The registration of the Consumer 2. SalFlowListener is registered * registered as notification listener. */ - BindingAwareConsumer consumer2 = new BindingAwareConsumer() { + BindingAwareProvider provider = new BindingAwareProvider() { + @Override - public void onSessionInitialized(ConsumerContext session) { + public void onSessionInitiated(ProviderContext session) { listener2Reg = session.getSALService(NotificationProviderService.class).registerNotificationListener( listener2); } + + @Override + public void onSessionInitialized(ConsumerContext session) { + // TODO Auto-generated method stub + + } + + @Override + public Collection getImplementations() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection getFunctionality() { + // TODO Auto-generated method stub + return null; + } + }; // registerConsumer method calls onSessionInitialized method above - broker.registerConsumer(consumer2, getBundleContext()); + broker.registerProvider(provider, getBundleContext()); /** * 3 notifications are published @@ -185,12 +218,31 @@ public class NoficationTest extends AbstractTest { @Override public void onFlowRemoved(FlowRemoved notification) { removedFlows.add(notification); - }; + }; @Override public void onFlowUpdated(FlowUpdated notification) { updatedFlows.add(notification); } + @Override + public void onSwitchFlowRemoved(SwitchFlowRemoved notification) { + // TODO Auto-generated method stub + + } + + @Override + public void onNodeErrorNotification(NodeErrorNotification notification) { + // TODO Auto-generated method stub + + } + + @Override + public void onNodeExperimenterErrorNotification( + NodeExperimenterErrorNotification notification) { + // TODO Auto-generated method stub + + } + } }