+++ /dev/null
-/**
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowplugin.impl.services;
-
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.JdkFutureAdapters;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.SettableFuture;
-import org.opendaylight.openflowjava.protocol.api.util.BinContent;
-import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
-import org.opendaylight.openflowplugin.api.openflow.device.Xid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterConfigCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterFeaturesCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter.config._case.MultipartRequestMeterConfigBuilder;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.util.concurrent.Future;
-
-/**
- * @author joe
- */
-public class OpendaylightMeterStatisticsServiceImpl extends CommonService implements OpendaylightMeterStatisticsService {
-
-
- @Override
- public Future<RpcResult<GetAllMeterConfigStatisticsOutput>> getAllMeterConfigStatistics(
- final GetAllMeterConfigStatisticsInput input) {
- return this
- .<GetAllMeterConfigStatisticsOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAllMeterConfigStatisticsOutput>, Future<RpcResult<Void>>>() {
-
- @Override
- public Future<RpcResult<Void>> apply(final DataCrate<GetAllMeterConfigStatisticsOutput> data) {
-
- MultipartRequestMeterConfigCaseBuilder caseBuilder =
- new MultipartRequestMeterConfigCaseBuilder();
- MultipartRequestMeterConfigBuilder mprMeterConfigBuild =
- new MultipartRequestMeterConfigBuilder();
- mprMeterConfigBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
- org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
- .types.rev130731.Meter.OFPMALL.getIntValue())));
- caseBuilder.setMultipartRequestMeterConfig(mprMeterConfigBuild.build());
-
- final Xid xid = deviceContext.getNextXid();
- data.getRequestContext().setXid(xid);
- MultipartRequestInputBuilder mprInput = RequestInputUtils
- .createMultipartHeader(MultipartType.OFPMPMETERCONFIG, xid.getValue(), version);
- mprInput.setMultipartRequestBody(caseBuilder.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext
- .getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
- return JdkFutureAdapters
- .listenInPoolThread(resultFromOFLib);
- }});
-
- }
-
- @Override
- public Future<RpcResult<GetAllMeterStatisticsOutput>> getAllMeterStatistics(final GetAllMeterStatisticsInput input) {
- final RequestContext<GetAllMeterStatisticsOutput> requestContext = requestContextStack.createRequestContext();
- final SettableFuture<RpcResult<GetAllMeterStatisticsOutput>> result = requestContextStack.storeOrFail(requestContext);
-
- if (!result.isDone()) {
-
- final Xid xid = deviceContext.getNextXid();
-
- MultipartRequestMeterCaseBuilder caseBuilder =
- new MultipartRequestMeterCaseBuilder();
- MultipartRequestMeterBuilder mprMeterBuild =
- new MultipartRequestMeterBuilder();
- mprMeterBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
- org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
- .types.rev130731.Meter.OFPMALL.getIntValue())));
- caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
-
- MultipartRequestInputBuilder mprInput = RequestInputUtils
- .createMultipartHeader(MultipartType.OFPMPMETER, xid.getValue(), version);
- mprInput.setMultipartRequestBody(caseBuilder.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext()
- .getConnectionAdapter().multipartRequest(mprInput.build());
-
- ListenableFuture<RpcResult<Void>> futureResultFromOfLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
- final RpcResultConvertor<GetAllMeterStatisticsOutput> rpcResultConvertor = new RpcResultConvertor<>(requestContext, deviceContext);
- rpcResultConvertor.processResultFromOfJava(futureResultFromOfLib);
- } else {
- RequestContextUtil.closeRequstContext(requestContext);
- }
- return result;
- }
-
- @Override
- public Future<RpcResult<GetMeterFeaturesOutput>> getMeterFeatures(final GetMeterFeaturesInput input) {
- final RequestContext requestContext = requestContextStack.createRequestContext();
- final SettableFuture<RpcResult<GetMeterFeaturesOutput>> result = requestContextStack.storeOrFail(requestContext);
-
- if (!result.isDone()) {
-
- final Xid xid = deviceContext.getNextXid();
-
- MultipartRequestMeterFeaturesCaseBuilder mprMeterFeaturesBuild =
- new MultipartRequestMeterFeaturesCaseBuilder();
-
- MultipartRequestInputBuilder mprInput =
- RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETERFEATURES, xid.getValue(), version);
- mprInput.setMultipartRequestBody(mprMeterFeaturesBuild.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
- ListenableFuture<RpcResult<Void>> futureResultFromOfLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
- final RpcResultConvertor<GetMeterFeaturesOutput> rpcResultConvertor = new RpcResultConvertor<>(requestContext, deviceContext);
- rpcResultConvertor.processResultFromOfJava(futureResultFromOfLib);
- } else {
- RequestContextUtil.closeRequstContext(requestContext);
- }
- return result;
- }
-
- @Override
- public Future<RpcResult<GetMeterStatisticsOutput>> getMeterStatistics(final GetMeterStatisticsInput input) {
- final RequestContext requestContext = requestContextStack.createRequestContext();
- final SettableFuture<RpcResult<GetMeterStatisticsOutput>> result = requestContextStack.storeOrFail(requestContext);
-
- if (!result.isDone()) {
-
- final Xid xid = deviceContext.getNextXid();
-
- MultipartRequestMeterCaseBuilder caseBuilder =
- new MultipartRequestMeterCaseBuilder();
- MultipartRequestMeterBuilder mprMeterBuild =
- new MultipartRequestMeterBuilder();
- mprMeterBuild.setMeterId(new MeterId(input.getMeterId().getValue()));
- caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
-
- MultipartRequestInputBuilder mprInput =
- RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETER, xid.getValue(), version);
- mprInput.setMultipartRequestBody(caseBuilder.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
- ListenableFuture<RpcResult<Void>> futureResultFromOfLib = JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
-
- final RpcResultConvertor<GetMeterStatisticsOutput> rpcResultConvertor = new RpcResultConvertor<>(requestContext, deviceContext);
- rpcResultConvertor.processResultFromOfJava(futureResultFromOfLib);
-
- } else {
- RequestContextUtil.closeRequstContext(requestContext);
- }
- return result;
- }
-
-}
+++ /dev/null
-/**
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.openflowplugin.impl.services;
-
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.JdkFutureAdapters;
-import org.opendaylight.openflowplugin.api.OFConstants;
-import org.opendaylight.openflowplugin.api.openflow.device.Xid;
-import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
-import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.util.concurrent.Future;
-
-/**
- * @author joe
- */
-public class OpendaylightPortStatisticsServiceImpl extends CommonService implements OpendaylightPortStatisticsService {
-
- @Override
- public Future<RpcResult<GetAllNodeConnectorsStatisticsOutput>> getAllNodeConnectorsStatistics(
- final GetAllNodeConnectorsStatisticsInput input) {
- return this
- .<GetAllNodeConnectorsStatisticsOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAllNodeConnectorsStatisticsOutput>, Future<RpcResult<Void>>>() {
-
- @Override
- public Future<RpcResult<Void>> apply(final DataCrate<GetAllNodeConnectorsStatisticsOutput> data) {
-
- MultipartRequestPortStatsCaseBuilder caseBuilder =
- new MultipartRequestPortStatsCaseBuilder();
- MultipartRequestPortStatsBuilder mprPortStatsBuilder =
- new MultipartRequestPortStatsBuilder();
- // Select all ports
- mprPortStatsBuilder.setPortNo(OFConstants.OFPP_ANY);
- caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
-
- final Xid xid = deviceContext.getNextXid();
- data.getRequestContext().setXid(xid);
- MultipartRequestInputBuilder mprInput = RequestInputUtils
- .createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), version);
- mprInput.setMultipartRequestBody(caseBuilder.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext
- .getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
- return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
- }});
- }
-
- @Override
- public Future<RpcResult<GetNodeConnectorStatisticsOutput>> getNodeConnectorStatistics(
- final GetNodeConnectorStatisticsInput input) {
- return this
- .<GetNodeConnectorStatisticsOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetNodeConnectorStatisticsOutput>, Future<RpcResult<Void>>>() {
-
- @Override
- public Future<RpcResult<Void>> apply(final DataCrate<GetNodeConnectorStatisticsOutput> data) {
-
- MultipartRequestPortStatsCaseBuilder caseBuilder =
- new MultipartRequestPortStatsCaseBuilder();
- MultipartRequestPortStatsBuilder mprPortStatsBuilder =
- new MultipartRequestPortStatsBuilder();
- // Set specific port
- mprPortStatsBuilder
- .setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
- OpenflowVersion.get(version),
- input.getNodeConnectorId()));
- caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
-
- final Xid xid = deviceContext.getNextXid();
- data.getRequestContext().setXid(xid);
- MultipartRequestInputBuilder mprInput = RequestInputUtils
- .createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), version);
- mprInput.setMultipartRequestBody(caseBuilder.build());
- Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext()
- .getConnectionAdapter().multipartRequest(mprInput.build());
- return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
- }});
-
- }
-
-}
}
- static void closeRequstContext(final RequestContext<?> requestContext) {
+ public static void closeRequstContext(final RequestContext<?> requestContext) {
try {
requestContext.close();
} catch (Exception e) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.impl.services;
+package org.opendaylight.openflowplugin.impl.statistics.services;
import com.google.common.base.Function;
-import org.opendaylight.yangtools.yang.binding.DataObject;
import com.google.common.util.concurrent.JdkFutureAdapters;
import com.google.common.util.concurrent.ListenableFuture;
-import java.util.concurrent.Future;
import org.opendaylight.openflowplugin.api.OFConstants;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
+import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
+import org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
+import org.opendaylight.openflowplugin.impl.services.RpcResultConvertor;
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.MatchReactor;
import org.opendaylight.openflowplugin.openflow.md.util.FlowCreatorUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestFlowCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlowBuilder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.concurrent.Future;
/**
* @author joe
private static final Logger LOG = LoggerFactory.getLogger(OpendaylightFlowStatisticsServiceImpl.class);
+ public OpendaylightFlowStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
@Override
public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> getAggregateFlowStatisticsFromFlowTableForAllFlows(
final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
- return this.<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>, Future<RpcResult<Void>>>() {
+
+ return this.<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION,
+ new Function<DataCrate<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>, Future<RpcResult<Void>>>() {
@Override
public Future<RpcResult<Void>> apply(final DataCrate<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput> data) {
@Override
public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> getAggregateFlowStatisticsFromFlowTableForGivenMatch(
final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
- return this.<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>, Future<RpcResult<Void>>>() {
+
+
+ return this.<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION,
+ new Function<DataCrate<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>, Future<RpcResult<Void>>>() {
@Override
public Future<RpcResult<Void>> apply(final DataCrate<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput> data) {
@Override
public Future<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> getAllFlowStatisticsFromFlowTable(
final GetAllFlowStatisticsFromFlowTableInput input) {
- return this.<GetAllFlowStatisticsFromFlowTableOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+
+ return this.<GetAllFlowStatisticsFromFlowTableOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetAllFlowStatisticsFromFlowTableOutput>, Future<RpcResult<Void>>>() {
@Override
@Override
public Future<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> getAllFlowsStatisticsFromAllFlowTables(
final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
- return this.<GetAllFlowsStatisticsFromAllFlowTablesOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+
+
+ return this.<GetAllFlowsStatisticsFromAllFlowTablesOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetAllFlowsStatisticsFromAllFlowTablesOutput>, Future<RpcResult<Void>>>() {
@Override
@Override
public Future<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
final GetFlowStatisticsFromFlowTableInput input) {
- return this.<GetFlowStatisticsFromFlowTableOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+
+
+ return this.<GetFlowStatisticsFromFlowTableOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetFlowStatisticsFromFlowTableOutput>, Future<RpcResult<Void>>>() {
@Override
}
private <T extends DataObject> void convertRpcResultToRequestFuture(final RequestContext<T> requestContext,
- final ListenableFuture<RpcResult<Void>> futureResultFromOfLib) {
+ final ListenableFuture<RpcResult<Void>> futureResultFromOfLib) {
final RpcResultConvertor<T> rpcResultConvertor = new RpcResultConvertor<>(requestContext, deviceContext);
rpcResultConvertor.processResultFromOfJava(futureResultFromOfLib);
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.impl.services;
+package org.opendaylight.openflowplugin.impl.statistics.services;
import com.google.common.base.Function;
import com.google.common.util.concurrent.JdkFutureAdapters;
-import java.util.concurrent.Future;
+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 org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestTableCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import java.util.concurrent.Future;
/**
* @author joe
public class OpendaylightFlowTableStatisticsServiceImpl extends CommonService implements
OpendaylightFlowTableStatisticsService {
+ public OpendaylightFlowTableStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
@Override
public Future<RpcResult<GetFlowTablesStatisticsOutput>> getFlowTablesStatistics(
final GetFlowTablesStatisticsInput input) {
- return this.<GetFlowTablesStatisticsOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+
+
+ return this.<GetFlowTablesStatisticsOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetFlowTablesStatisticsOutput>, Future<RpcResult<Void>>>() {
@Override
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.impl.services;
+package org.opendaylight.openflowplugin.impl.statistics.services;
import com.google.common.base.Function;
import com.google.common.util.concurrent.JdkFutureAdapters;
-import java.util.concurrent.Future;
import org.opendaylight.openflowjava.protocol.api.util.BinContent;
+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 org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestGroupFeaturesCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.group._case.MultipartRequestGroupBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import java.util.concurrent.Future;
/**
* @author joe
*/
public class OpendaylightGroupStatisticsServiceImpl extends CommonService implements OpendaylightGroupStatisticsService {
+
+ public OpendaylightGroupStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
@Override
public Future<RpcResult<GetAllGroupStatisticsOutput>> getAllGroupStatistics(final GetAllGroupStatisticsInput input) {
- return this.<GetAllGroupStatisticsOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+
+
+ return this.<GetAllGroupStatisticsOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetAllGroupStatisticsOutput>, Future<RpcResult<Void>>>() {
@Override
@Override
public Future<RpcResult<GetGroupDescriptionOutput>> getGroupDescription(final GetGroupDescriptionInput input) {
- return this.<GetGroupDescriptionOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+ return this.<GetGroupDescriptionOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetGroupDescriptionOutput>, Future<RpcResult<Void>>>() {
@Override
@Override
public Future<RpcResult<GetGroupFeaturesOutput>> getGroupFeatures(final GetGroupFeaturesInput input) {
- return this.<GetGroupFeaturesOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+ return this.<GetGroupFeaturesOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetGroupFeaturesOutput>, Future<RpcResult<Void>>>() {
@Override
@Override
public Future<RpcResult<GetGroupStatisticsOutput>> getGroupStatistics(final GetGroupStatisticsInput input) {
- return this.<GetGroupStatisticsOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
+ return this.<GetGroupStatisticsOutput, Void>handleServiceCall(PRIMARY_CONNECTION,
new Function<DataCrate<GetGroupStatisticsOutput>, Future<RpcResult<Void>>>() {
@Override
--- /dev/null
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowplugin.impl.statistics.services;
+
+import com.google.common.base.Function;
+import com.google.common.util.concurrent.JdkFutureAdapters;
+import org.opendaylight.openflowjava.protocol.api.util.BinContent;
+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 org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MeterId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterConfigCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestMeterFeaturesCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter._case.MultipartRequestMeterBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.meter.config._case.MultipartRequestMeterConfigBuilder;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import java.util.concurrent.Future;
+
+/**
+ * @author joe
+ */
+public class OpendaylightMeterStatisticsServiceImpl extends CommonService implements OpendaylightMeterStatisticsService {
+
+
+ public OpendaylightMeterStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
+ @Override
+ public Future<RpcResult<GetAllMeterConfigStatisticsOutput>> getAllMeterConfigStatistics(
+ final GetAllMeterConfigStatisticsInput input) {
+ return this
+ .<GetAllMeterConfigStatisticsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetAllMeterConfigStatisticsOutput>, Future<RpcResult<Void>>>() {
+
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetAllMeterConfigStatisticsOutput> data) {
+
+ MultipartRequestMeterConfigCaseBuilder caseBuilder =
+ new MultipartRequestMeterConfigCaseBuilder();
+ MultipartRequestMeterConfigBuilder mprMeterConfigBuild =
+ new MultipartRequestMeterConfigBuilder();
+ mprMeterConfigBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
+ .types.rev130731.Meter.OFPMALL.getIntValue())));
+ caseBuilder.setMultipartRequestMeterConfig(mprMeterConfigBuild.build());
+
+ final Xid xid = deviceContext.getNextXid();
+ data.getRequestContext().setXid(xid);
+ MultipartRequestInputBuilder mprInput = RequestInputUtils
+ .createMultipartHeader(MultipartType.OFPMPMETERCONFIG, xid.getValue(), version);
+ mprInput.setMultipartRequestBody(caseBuilder.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext
+ .getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
+ return JdkFutureAdapters
+ .listenInPoolThread(resultFromOFLib);
+ }
+ });
+
+ }
+
+ @Override
+ public Future<RpcResult<GetAllMeterStatisticsOutput>> getAllMeterStatistics(final GetAllMeterStatisticsInput input) {
+
+ final long xid = deviceContext.getNextXid().getValue();
+ return this.<GetAllMeterStatisticsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION,
+ new Function<DataCrate<GetAllMeterStatisticsOutput>, Future<RpcResult<Void>>>() {
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetAllMeterStatisticsOutput> data) {
+
+ MultipartRequestMeterCaseBuilder caseBuilder =
+ new MultipartRequestMeterCaseBuilder();
+ MultipartRequestMeterBuilder mprMeterBuild =
+ new MultipartRequestMeterBuilder();
+ mprMeterBuild.setMeterId(new MeterId(BinContent.intToUnsignedLong(
+ org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
+ .types.rev130731.Meter.OFPMALL.getIntValue())));
+ caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
+
+ MultipartRequestInputBuilder mprInput = RequestInputUtils
+ .createMultipartHeader(MultipartType.OFPMPMETER, xid, version);
+ mprInput.setMultipartRequestBody(caseBuilder.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext()
+ .getConnectionAdapter().multipartRequest(mprInput.build());
+
+ return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+ }
+ }
+ );
+
+ }
+
+ @Override
+ public Future<RpcResult<GetMeterFeaturesOutput>> getMeterFeatures(final GetMeterFeaturesInput input) {
+ final long xid = deviceContext.getNextXid().getValue();
+ return this.<GetMeterFeaturesOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION,
+ new Function<DataCrate<GetMeterFeaturesOutput>, Future<RpcResult<Void>>>() {
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetMeterFeaturesOutput> data) {
+
+ MultipartRequestMeterFeaturesCaseBuilder mprMeterFeaturesBuild =
+ new MultipartRequestMeterFeaturesCaseBuilder();
+
+ MultipartRequestInputBuilder mprInput =
+ RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETERFEATURES, xid, version);
+ mprInput.setMultipartRequestBody(mprMeterFeaturesBuild.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
+ return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+ }
+ });
+ }
+
+ @Override
+ public Future<RpcResult<GetMeterStatisticsOutput>> getMeterStatistics(final GetMeterStatisticsInput input) {
+ final long xid = deviceContext.getNextXid().getValue();
+ return this.<GetMeterStatisticsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION,
+ new Function<DataCrate<GetMeterStatisticsOutput>, Future<RpcResult<Void>>>() {
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetMeterStatisticsOutput> data) {
+ MultipartRequestMeterCaseBuilder caseBuilder =
+ new MultipartRequestMeterCaseBuilder();
+ MultipartRequestMeterBuilder mprMeterBuild =
+ new MultipartRequestMeterBuilder();
+ mprMeterBuild.setMeterId(new MeterId(input.getMeterId().getValue()));
+ caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
+
+ MultipartRequestInputBuilder mprInput =
+ RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETER, xid, version);
+ mprInput.setMultipartRequestBody(caseBuilder.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
+ return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+ }
+ });
+
+ }
+
+}
--- /dev/null
+/**
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowplugin.impl.statistics.services;
+
+import com.google.common.base.Function;
+import com.google.common.util.concurrent.JdkFutureAdapters;
+import org.opendaylight.openflowplugin.api.OFConstants;
+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 org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
+import org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
+import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestPortStatsCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.port.stats._case.MultipartRequestPortStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import java.util.concurrent.Future;
+
+/**
+ * @author joe
+ */
+public class OpendaylightPortStatisticsServiceImpl extends CommonService implements OpendaylightPortStatisticsService {
+
+ public OpendaylightPortStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
+ @Override
+ public Future<RpcResult<GetAllNodeConnectorsStatisticsOutput>> getAllNodeConnectorsStatistics(
+ final GetAllNodeConnectorsStatisticsInput input) {
+ return this
+ .<GetAllNodeConnectorsStatisticsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetAllNodeConnectorsStatisticsOutput>, Future<RpcResult<Void>>>() {
+
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetAllNodeConnectorsStatisticsOutput> data) {
+
+ MultipartRequestPortStatsCaseBuilder caseBuilder =
+ new MultipartRequestPortStatsCaseBuilder();
+ MultipartRequestPortStatsBuilder mprPortStatsBuilder =
+ new MultipartRequestPortStatsBuilder();
+ // Select all ports
+ mprPortStatsBuilder.setPortNo(OFConstants.OFPP_ANY);
+ caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
+
+ final Xid xid = deviceContext.getNextXid();
+ data.getRequestContext().setXid(xid);
+ MultipartRequestInputBuilder mprInput = RequestInputUtils
+ .createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), version);
+ mprInput.setMultipartRequestBody(caseBuilder.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext
+ .getPrimaryConnectionContext().getConnectionAdapter().multipartRequest(mprInput.build());
+ return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+ }
+ });
+ }
+
+ @Override
+ public Future<RpcResult<GetNodeConnectorStatisticsOutput>> getNodeConnectorStatistics(
+ final GetNodeConnectorStatisticsInput input) {
+ return this
+ .<GetNodeConnectorStatisticsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetNodeConnectorStatisticsOutput>, Future<RpcResult<Void>>>() {
+
+ @Override
+ public Future<RpcResult<Void>> apply(final DataCrate<GetNodeConnectorStatisticsOutput> data) {
+
+ MultipartRequestPortStatsCaseBuilder caseBuilder =
+ new MultipartRequestPortStatsCaseBuilder();
+ MultipartRequestPortStatsBuilder mprPortStatsBuilder =
+ new MultipartRequestPortStatsBuilder();
+ // Set specific port
+ mprPortStatsBuilder
+ .setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(
+ OpenflowVersion.get(version),
+ input.getNodeConnectorId()));
+ caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
+
+ final Xid xid = deviceContext.getNextXid();
+ data.getRequestContext().setXid(xid);
+ MultipartRequestInputBuilder mprInput = RequestInputUtils
+ .createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), version);
+ mprInput.setMultipartRequestBody(caseBuilder.build());
+ Future<RpcResult<Void>> resultFromOFLib = deviceContext.getPrimaryConnectionContext()
+ .getConnectionAdapter().multipartRequest(mprInput.build());
+ return JdkFutureAdapters.listenInPoolThread(resultFromOFLib);
+ }
+ });
+
+ }
+
+}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.openflowplugin.impl.services;
+package org.opendaylight.openflowplugin.impl.statistics.services;
import com.google.common.base.Function;
import com.google.common.util.concurrent.JdkFutureAdapters;
import org.opendaylight.openflowplugin.api.OFConstants;
+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 org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
+import org.opendaylight.openflowplugin.impl.services.CommonService;
+import org.opendaylight.openflowplugin.impl.services.DataCrate;
+import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
*/
public class OpendaylightQueueStatisticsServiceImpl extends CommonService implements OpendaylightQueueStatisticsService {
+ public OpendaylightQueueStatisticsServiceImpl(final RequestContextStack requestContextStack, DeviceContext deviceContext) {
+ super(requestContextStack, deviceContext);
+ }
+
@Override
public Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> getAllQueuesStatisticsFromAllPorts(
final GetAllQueuesStatisticsFromAllPortsInput input) {
- return this.<GetAllQueuesStatisticsFromAllPortsOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAllQueuesStatisticsFromAllPortsOutput>, Future<RpcResult<Void>>>() {
+ return this.<GetAllQueuesStatisticsFromAllPortsOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetAllQueuesStatisticsFromAllPortsOutput>, Future<RpcResult<Void>>>() {
@Override
public Future<RpcResult<Void>> apply(final DataCrate<GetAllQueuesStatisticsFromAllPortsOutput> data) {
@Override
public Future<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> getAllQueuesStatisticsFromGivenPort(
final GetAllQueuesStatisticsFromGivenPortInput input) {
- return this.<GetAllQueuesStatisticsFromGivenPortOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetAllQueuesStatisticsFromGivenPortOutput>, Future<RpcResult<Void>>>() {
+ return this.<GetAllQueuesStatisticsFromGivenPortOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetAllQueuesStatisticsFromGivenPortOutput>, Future<RpcResult<Void>>>() {
@Override
public Future<RpcResult<Void>> apply(final DataCrate<GetAllQueuesStatisticsFromGivenPortOutput> data) {
@Override
public Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> getQueueStatisticsFromGivenPort(
final GetQueueStatisticsFromGivenPortInput input) {
- return this.<GetQueueStatisticsFromGivenPortOutput, Void> handleServiceCall(
- PRIMARY_CONNECTION, new Function<DataCrate<GetQueueStatisticsFromGivenPortOutput>, Future<RpcResult<Void>>>() {
+ return this.<GetQueueStatisticsFromGivenPortOutput, Void>handleServiceCall(
+ PRIMARY_CONNECTION, new Function<DataCrate<GetQueueStatisticsFromGivenPortOutput>, Future<RpcResult<Void>>>() {
@Override
public Future<RpcResult<Void>> apply(final DataCrate<GetQueueStatisticsFromGivenPortOutput> data) {
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext;
import org.opendaylight.openflowplugin.impl.services.NodeConfigServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightFlowStatisticsServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightFlowTableStatisticsServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightGroupStatisticsServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightMeterStatisticsServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightPortStatisticsServiceImpl;
-import org.opendaylight.openflowplugin.impl.services.OpendaylightQueueStatisticsServiceImpl;
import org.opendaylight.openflowplugin.impl.services.PacketProcessingServiceImpl;
import org.opendaylight.openflowplugin.impl.services.SalFlowServiceImpl;
import org.opendaylight.openflowplugin.impl.services.SalGroupServiceImpl;
import org.opendaylight.openflowplugin.impl.services.SalMeterServiceImpl;
import org.opendaylight.openflowplugin.impl.services.SalTableServiceImpl;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.OpendaylightGroupStatisticsService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
/**
rpcContext.registerRpcServiceImplementation(SalGroupService.class, new SalGroupServiceImpl());
rpcContext.registerRpcServiceImplementation(SalTableService.class, new SalTableServiceImpl());
rpcContext.registerRpcServiceImplementation(PacketProcessingService.class, new PacketProcessingServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightFlowStatisticsService.class,
- new OpendaylightFlowStatisticsServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightGroupStatisticsService.class,
- new OpendaylightGroupStatisticsServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightMeterStatisticsService.class,
- new OpendaylightMeterStatisticsServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightPortStatisticsService.class,
- new OpendaylightPortStatisticsServiceImpl());
rpcContext.registerRpcServiceImplementation(NodeConfigService.class, new NodeConfigServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightFlowTableStatisticsService.class,
- new OpendaylightFlowTableStatisticsServiceImpl());
- rpcContext.registerRpcServiceImplementation(OpendaylightQueueStatisticsService.class,
- new OpendaylightQueueStatisticsServiceImpl());
}
}