code cleanup
[openflowplugin.git] / drop-test / src / main / java / org / opendaylight / openflowplugin / droptest / DropTestActivator.java
index 04c33fb932e6249a26218619d41936570b978a86..046be93bd3a4ebac679a5453d7a823f2ad53984e 100644 (file)
@@ -8,10 +8,12 @@
 package org.opendaylight.openflowplugin.droptest;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.NotificationService;
 import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.openflowplugin.outputtest.OutputTestCommandProvider;
+import org.opendaylight.openflowplugin.testcommon.DropTestDsProvider;
+import org.opendaylight.openflowplugin.testcommon.DropTestRpcProvider;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
@@ -21,12 +23,10 @@ import org.slf4j.LoggerFactory;
 public class DropTestActivator extends AbstractBindingAwareProvider {
     private static Logger LOG = LoggerFactory.getLogger(DropTestActivator.class);
 
-    private static DropTestProvider provider = new DropTestProvider();
+    private static DropTestDsProvider provider = new DropTestDsProvider();
 
     private static DropTestRpcProvider rpcProvider = new DropTestRpcProvider();
 
-    private static DropTestCommandProvider cmdProvider;
-
     private static OutputTestCommandProvider outCmdProvider;
 
 
@@ -34,11 +34,9 @@ public class DropTestActivator extends AbstractBindingAwareProvider {
         LOG.debug("Activator DropAllPack INIT");
         provider.setDataService(session.<DataBroker>getSALService(DataBroker.class));
 
-        provider.setNotificationService(session.<NotificationProviderService>getSALService(NotificationProviderService.class));
-
-        cmdProvider.onSessionInitiated(session);
+        provider.setNotificationService(session.<NotificationService>getSALService(NotificationService.class));
 
-        rpcProvider.setNotificationService(session.<NotificationProviderService>getSALService(NotificationProviderService.class));
+        rpcProvider.setNotificationService(session.<NotificationService>getSALService(NotificationService.class));
 
         rpcProvider.setFlowService(session.<SalFlowService>getRpcService(SalFlowService.class));
         outCmdProvider.onSessionInitiated(session);
@@ -49,7 +47,6 @@ public class DropTestActivator extends AbstractBindingAwareProvider {
     public void startImpl(final BundleContext ctx) {
         super.startImpl(ctx);
 //      LOG.debug("-------------------------------------    DROP ALL PACK TEST INITIATED ------------------------ ")
-        cmdProvider = new DropTestCommandProvider(ctx, provider, rpcProvider);
         outCmdProvider = new OutputTestCommandProvider(ctx);
     }