From 3d706ff1f96dbc5d15b124ca8f15078938d87b75 Mon Sep 17 00:00:00 2001 From: Timotej Kubas Date: Tue, 14 Apr 2015 16:37:28 +0200 Subject: [PATCH] Fixing + testing meter services Change-Id: I04296173125c65168131ad331af88e41445c15a7 Signed-off-by: Timotej Kubas --- .../openflowplugin/impl/services/SalMeterServiceImpl.java | 6 ++++++ .../openflowplugin/impl/util/MdSalRegistratorUtils.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMeterServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMeterServiceImpl.java index fd23e57380..c824f8f346 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMeterServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMeterServiceImpl.java @@ -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> addMeter(final AddMeterInput input) { return this.handleServiceCall( PRIMARY_CONNECTION, diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistratorUtils.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistratorUtils.java index 54a1199bcc..5040fa8e5d 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistratorUtils.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistratorUtils.java @@ -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)); -- 2.36.6