Fixing + testing meter services 75/18275/1
authorTimotej Kubas <tkubas@cisco.com>
Tue, 14 Apr 2015 14:37:28 +0000 (16:37 +0200)
committerTimotej Kubas <tkubas@cisco.com>
Tue, 14 Apr 2015 14:37:52 +0000 (16:37 +0200)
Change-Id: I04296173125c65168131ad331af88e41445c15a7
Signed-off-by: Timotej Kubas <tkubas@cisco.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMeterServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistratorUtils.java

index fd23e573808391bbb4c99a980b65c274e6141401..c824f8f34685a38e1698aecc50b93f13ae5f0f1b 100644 (file)
@@ -9,6 +9,8 @@ package org.opendaylight.openflowplugin.impl.services;
 
 import com.google.common.util.concurrent.JdkFutureAdapters;
 import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
+import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import com.google.common.base.Function;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.MeterConvertor;
@@ -29,6 +31,10 @@ public class SalMeterServiceImpl extends CommonService implements SalMeterServic
 
     private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(SalMeterServiceImpl.class);
 
+    public SalMeterServiceImpl(RequestContextStack requestContextStack, DeviceContext deviceContext) {
+        super(requestContextStack, deviceContext);
+    }
+
     @Override
     public Future<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
         return this.<AddMeterOutput, Void>handleServiceCall( PRIMARY_CONNECTION,
index 54a1199bccc740f2e2e562f74a0703b4518193e5..5040fa8e5ddc387a5ebb5f9e8832510b51dcf768 100644 (file)
@@ -34,7 +34,7 @@ public class MdSalRegistratorUtils {
     public static void registerServices(final RpcContext rpcContext, final DeviceContext deviceContext) {
         rpcContext.registerRpcServiceImplementation(SalFlowService.class, new SalFlowServiceImpl(rpcContext, deviceContext));
         //TODO: add constructors with rcpContext and deviceContext to meter, group, table constructors
-        rpcContext.registerRpcServiceImplementation(SalMeterService.class, new SalMeterServiceImpl());
+        rpcContext.registerRpcServiceImplementation(SalMeterService.class, new SalMeterServiceImpl(rpcContext, deviceContext));
         rpcContext.registerRpcServiceImplementation(SalGroupService.class, new SalGroupServiceImpl(rpcContext, deviceContext));
         rpcContext.registerRpcServiceImplementation(SalTableService.class, new SalTableServiceImpl());
         rpcContext.registerRpcServiceImplementation(PacketProcessingService.class, new PacketProcessingServiceImpl(rpcContext, deviceContext));