2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.openflow.md.core.sal;
10 import com.google.common.util.concurrent.Futures;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import java.util.concurrent.Future;
13 import java.util.concurrent.TimeUnit;
14 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
15 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
16 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.PacketOutConvertor;
17 import org.opendaylight.openflowplugin.api.openflow.md.core.session.IMessageDispatchService;
18 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
19 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
20 import org.opendaylight.openflowplugin.openflow.md.core.session.SwitchConnectionCookieOFImpl;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowOutput;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowOutput;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowOutput;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableOutput;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowsStatisticsFromAllFlowTablesInput;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowsStatisticsFromAllFlowTablesOutput;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetFlowStatisticsFromFlowTableInput;
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetFlowStatisticsFromFlowTableOutput;
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsInput;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.GetFlowTablesStatisticsOutput;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInput;
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupOutput;
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInput;
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput;
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupInput;
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.UpdateGroupOutput;
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInput;
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput;
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionInput;
48 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionOutput;
49 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesInput;
50 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesOutput;
51 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupStatisticsInput;
52 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupStatisticsOutput;
53 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
54 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
55 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterInput;
56 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput;
57 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.RemoveMeterInput;
58 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.RemoveMeterOutput;
59 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterInput;
60 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput;
61 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput;
62 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsOutput;
63 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsInput;
64 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterStatisticsOutput;
65 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesInput;
66 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterFeaturesOutput;
67 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsInput;
68 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetMeterStatisticsOutput;
69 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigInput;
70 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.SetConfigOutput;
71 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
72 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.ConnectionCookie;
73 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
74 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.UpdatePortInput;
75 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.UpdatePortOutput;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsInput;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetAllNodeConnectorsStatisticsOutput;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsInput;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.GetNodeConnectorStatisticsOutput;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInput;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsOutput;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortInput;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortOutput;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortInput;
85 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortOutput;
86 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableInput;
87 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableOutput;
88 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
89 import org.opendaylight.yangtools.yang.common.RpcResult;
90 import org.slf4j.Logger;
93 * RPC implementation of MD-switch
95 public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
97 private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(ModelDrivenSwitchImpl.class);
98 private final NodeId nodeId;
99 private final IMessageDispatchService messageService;
100 private short version = 0;
101 private OFRpcTaskContext rpcTaskContext;
103 // TODO:read timeout from configSubsystem
104 protected long maxTimeout = 1000;
105 protected TimeUnit maxTimeoutUnit = TimeUnit.MILLISECONDS;
107 protected ModelDrivenSwitchImpl(final NodeId nodeId, final InstanceIdentifier<Node> identifier,
108 final SessionContext sessionContext) {
109 super(identifier, sessionContext);
110 this.nodeId = nodeId;
111 messageService = sessionContext.getMessageDispatchService();
112 version = sessionContext.getPrimaryConductor().getVersion();
113 final NotificationProviderService rpcNotificationProviderService = OFSessionUtil.getSessionManager().getNotificationProviderService();
115 rpcTaskContext = new OFRpcTaskContext();
116 rpcTaskContext.setSession(sessionContext);
117 rpcTaskContext.setMessageService(messageService);
118 rpcTaskContext.setRpcNotificationProviderService(rpcNotificationProviderService);
119 rpcTaskContext.setMaxTimeout(maxTimeout);
120 rpcTaskContext.setMaxTimeoutUnit(maxTimeoutUnit);
121 rpcTaskContext.setRpcPool(OFSessionUtil.getSessionManager().getRpcPool());
122 rpcTaskContext.setMessageSpy(OFSessionUtil.getSessionManager().getMessageSpy());
126 public Future<RpcResult<AddFlowOutput>> addFlow(final AddFlowInput input) {
127 LOG.debug("Calling the FlowMod RPC method on MessageDispatchService");
128 // use primary connection
129 SwitchConnectionDistinguisher cookie = null;
131 OFRpcTask<AddFlowInput, RpcResult<UpdateFlowOutput>> task =
132 OFRpcTaskFactory.createAddFlowTask(rpcTaskContext, input, cookie);
133 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
135 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddFlowOutput());
140 public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
141 LOG.debug("Calling the GroupMod RPC method on MessageDispatchService");
143 // use primary connection
144 SwitchConnectionDistinguisher cookie = null;
146 OFRpcTask<AddGroupInput, RpcResult<UpdateGroupOutput>> task =
147 OFRpcTaskFactory.createAddGroupTask(rpcTaskContext, input, cookie);
148 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
150 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddGroupOutput());
154 public Future<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
155 LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
157 // use primary connection
158 SwitchConnectionDistinguisher cookie = null;
160 OFRpcTask<AddMeterInput, RpcResult<UpdateMeterOutput>> task =
161 OFRpcTaskFactory.createAddMeterTask(rpcTaskContext, input, cookie);
162 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
164 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForAddMeterOutput());
168 public Future<RpcResult<RemoveFlowOutput>> removeFlow(final RemoveFlowInput input) {
169 LOG.debug("Calling the removeFlow RPC method on MessageDispatchService");
171 // use primary connection
172 SwitchConnectionDistinguisher cookie = null;
173 OFRpcTask<RemoveFlowInput, RpcResult<UpdateFlowOutput>> task =
174 OFRpcTaskFactory.createRemoveFlowTask(rpcTaskContext, input, cookie);
175 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
177 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveFlowOutput());
181 public Future<RpcResult<RemoveGroupOutput>> removeGroup(final RemoveGroupInput input) {
182 LOG.debug("Calling the Remove Group RPC method on MessageDispatchService");
184 SwitchConnectionDistinguisher cookie = null;
185 OFRpcTask<RemoveGroupInput, RpcResult<UpdateGroupOutput>> task =
186 OFRpcTaskFactory.createRemoveGroupTask(rpcTaskContext, input, cookie);
187 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
189 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveGroupOutput());
193 public Future<RpcResult<RemoveMeterOutput>> removeMeter(final RemoveMeterInput input) {
194 LOG.debug("Calling the Remove MeterMod RPC method on MessageDispatchService");
196 SwitchConnectionDistinguisher cookie = null;
197 OFRpcTask<RemoveMeterInput, RpcResult<UpdateMeterOutput>> task =
198 OFRpcTaskFactory.createRemoveMeterTask(rpcTaskContext, input, cookie);
199 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
201 return Futures.transform(result, OFRpcFutureResultTransformFactory.createForRemoveMeterOutput());
205 public Future<RpcResult<Void>> transmitPacket(final TransmitPacketInput input) {
206 LOG.debug("TransmitPacket - {}", input);
207 // Convert TransmitPacket to PacketOutInput
208 PacketOutInput message = PacketOutConvertor.toPacketOutInput(input, version, sessionContext.getNextXid(),
209 sessionContext.getFeatures().getDatapathId());
211 SwitchConnectionDistinguisher cookie = null;
212 ConnectionCookie connectionCookie = input.getConnectionCookie();
213 if (connectionCookie != null && connectionCookie.getValue() != null) {
214 cookie = new SwitchConnectionCookieOFImpl(connectionCookie.getValue());
217 LOG.debug("Calling the transmitPacket RPC method");
218 return messageService.packetOut(message, cookie);
222 public Future<RpcResult<UpdateFlowOutput>> updateFlow(final UpdateFlowInput input) {
223 LOG.debug("Calling the updateFlow RPC method on MessageDispatchService");
225 // use primary connection
226 SwitchConnectionDistinguisher cookie = null;
228 OFRpcTask<UpdateFlowInput, RpcResult<UpdateFlowOutput>> task =
229 OFRpcTaskFactory.createUpdateFlowTask(rpcTaskContext, input, cookie);
230 ListenableFuture<RpcResult<UpdateFlowOutput>> result = task.submit();
236 public Future<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) {
237 LOG.debug("Calling the update Group Mod RPC method on MessageDispatchService");
239 // use primary connection
240 SwitchConnectionDistinguisher cookie = null;
242 OFRpcTask<UpdateGroupInput, RpcResult<UpdateGroupOutput>> task =
243 OFRpcTaskFactory.createUpdateGroupTask(rpcTaskContext, input, cookie);
244 ListenableFuture<RpcResult<UpdateGroupOutput>> result = task.submit();
250 public Future<RpcResult<UpdateMeterOutput>> updateMeter(final UpdateMeterInput input) {
251 LOG.debug("Calling the MeterMod RPC method on MessageDispatchService");
253 // use primary connection
254 SwitchConnectionDistinguisher cookie = null;
256 OFRpcTask<UpdateMeterInput, RpcResult<UpdateMeterOutput>> task =
257 OFRpcTaskFactory.createUpdateMeterTask(rpcTaskContext, input, cookie);
258 ListenableFuture<RpcResult<UpdateMeterOutput>> result = task.submit();
264 public NodeId getNodeId() {
270 public Future<RpcResult<GetAllGroupStatisticsOutput>> getAllGroupStatistics(final GetAllGroupStatisticsInput input) {
271 // use primary connection
272 LOG.debug("Calling the getAllGroupStatistics RPC method on MessageDispatchService");
273 SwitchConnectionDistinguisher cookie = null;
275 OFRpcTask<GetAllGroupStatisticsInput, RpcResult<GetAllGroupStatisticsOutput>> task =
276 OFRpcTaskFactory.createGetAllGroupStatisticsTask(rpcTaskContext, input, cookie);
277 ListenableFuture<RpcResult<GetAllGroupStatisticsOutput>> result = task.submit();
284 public Future<RpcResult<GetGroupDescriptionOutput>> getGroupDescription(final GetGroupDescriptionInput input) {
285 LOG.debug("Calling the getGroupDescription RPC method on MessageDispatchService");
287 OFRpcTask<GetGroupDescriptionInput, RpcResult<GetGroupDescriptionOutput>> task =
288 OFRpcTaskFactory.createGetGroupDescriptionTask(rpcTaskContext, input, null);
289 return task.submit();
293 public Future<RpcResult<GetGroupFeaturesOutput>> getGroupFeatures(final GetGroupFeaturesInput input) {
294 LOG.debug("Calling the getGroupFeatures RPC method on MessageDispatchService");
296 OFRpcTask<GetGroupFeaturesInput, RpcResult<GetGroupFeaturesOutput>> task =
297 OFRpcTaskFactory.createGetGroupFeaturesTask(rpcTaskContext, input, null);
298 return task.submit();
302 public Future<RpcResult<GetGroupStatisticsOutput>> getGroupStatistics(final GetGroupStatisticsInput input) {
303 LOG.debug("Calling the getGroupStatistics RPC method on MessageDispatchService");
305 OFRpcTask<GetGroupStatisticsInput, RpcResult<GetGroupStatisticsOutput>> task =
306 OFRpcTaskFactory.createGetGroupStatisticsTask(rpcTaskContext, input, null);
307 return task.submit();
311 public Future<RpcResult<GetAllMeterConfigStatisticsOutput>> getAllMeterConfigStatistics(
312 final GetAllMeterConfigStatisticsInput input) {
313 LOG.debug("Calling the getAllMeterConfigStatistics RPC method on MessageDispatchService");
315 OFRpcTask<GetAllMeterConfigStatisticsInput, RpcResult<GetAllMeterConfigStatisticsOutput>> task =
316 OFRpcTaskFactory.createGetAllMeterConfigStatisticsTask(rpcTaskContext, input, null);
317 return task.submit();
321 public Future<RpcResult<GetAllMeterStatisticsOutput>> getAllMeterStatistics(
322 final GetAllMeterStatisticsInput input) {
323 LOG.debug("Calling the getAllMeterStatistics RPC method on MessageDispatchService");
325 OFRpcTask<GetAllMeterStatisticsInput, RpcResult<GetAllMeterStatisticsOutput>> task =
326 OFRpcTaskFactory.createGetAllMeterStatisticsTask(rpcTaskContext, input, null);
327 return task.submit();
331 public Future<RpcResult<GetMeterFeaturesOutput>> getMeterFeatures(
332 final GetMeterFeaturesInput input) {
333 LOG.debug("Calling the getMeterFeatures RPC method on MessageDispatchService");
335 OFRpcTask<GetMeterFeaturesInput, RpcResult<GetMeterFeaturesOutput>> task =
336 OFRpcTaskFactory.createGetMeterFeaturesTask(rpcTaskContext, input, null);
337 return task.submit();
341 public Future<RpcResult<GetMeterStatisticsOutput>> getMeterStatistics(
342 final GetMeterStatisticsInput input) {
343 LOG.debug("Calling the getMeterStatistics RPC method on MessageDispatchService");
345 OFRpcTask<GetMeterStatisticsInput, RpcResult<GetMeterStatisticsOutput>> task =
346 OFRpcTaskFactory.createGetMeterStatisticsTask(rpcTaskContext, input, null);
347 return task.submit();
351 public Future<RpcResult<GetAllNodeConnectorsStatisticsOutput>> getAllNodeConnectorsStatistics(
352 final GetAllNodeConnectorsStatisticsInput input) {
353 LOG.debug("Calling the getAllNodeConnectorsStatistics RPC method on MessageDispatchService");
355 OFRpcTask<GetAllNodeConnectorsStatisticsInput, RpcResult<GetAllNodeConnectorsStatisticsOutput>> task =
356 OFRpcTaskFactory.createGetAllNodeConnectorsStatisticsTask(rpcTaskContext, input, null);
357 return task.submit();
361 public Future<RpcResult<GetNodeConnectorStatisticsOutput>> getNodeConnectorStatistics(
362 final GetNodeConnectorStatisticsInput input) {
363 LOG.debug("Calling the getNodeConnectorStatistics RPC method on MessageDispatchService");
365 OFRpcTask<GetNodeConnectorStatisticsInput, RpcResult<GetNodeConnectorStatisticsOutput>> task =
366 OFRpcTaskFactory.createGetNodeConnectorStatisticsTask(rpcTaskContext, input, null);
367 return task.submit();
371 public Future<RpcResult<UpdatePortOutput>> updatePort(final UpdatePortInput input) {
372 LOG.debug("Calling the updatePort RPC method on MessageDispatchService");
374 OFRpcTask<UpdatePortInput, RpcResult<UpdatePortOutput>> task =
375 OFRpcTaskFactory.createUpdatePortTask(rpcTaskContext, input, null);
376 return task.submit();
380 public Future<RpcResult<UpdateTableOutput>> updateTable(final UpdateTableInput input) {
381 LOG.debug("Calling the updateTable RPC method on MessageDispatchService");
383 OFRpcTask<UpdateTableInput, RpcResult<UpdateTableOutput>> task =
384 OFRpcTaskFactory.createUpdateTableTask(rpcTaskContext, input, null);
385 return task.submit();
389 public Future<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> getAllFlowStatisticsFromFlowTable(
390 final GetAllFlowStatisticsFromFlowTableInput input) {
391 LOG.debug("Calling the getAllFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
393 OFRpcTask<GetAllFlowStatisticsFromFlowTableInput, RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> task =
394 OFRpcTaskFactory.createGetAllFlowStatisticsFromFlowTableTask(rpcTaskContext, input, null);
395 return task.submit();
399 public Future<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> getAllFlowsStatisticsFromAllFlowTables(
400 final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
401 LOG.debug("Calling the getAllFlowsStatisticsFromAllFlowTables RPC method on MessageDispatchService");
403 OFRpcTask<GetAllFlowsStatisticsFromAllFlowTablesInput, RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> task =
404 OFRpcTaskFactory.createGetAllFlowsStatisticsFromAllFlowTablesTask(rpcTaskContext, input, null);
405 return task.submit();
409 public Future<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
410 final GetFlowStatisticsFromFlowTableInput input) {
411 LOG.debug("Calling the getFlowStatisticsFromFlowTable RPC method on MessageDispatchService");
413 OFRpcTask<GetFlowStatisticsFromFlowTableInput, RpcResult<GetFlowStatisticsFromFlowTableOutput>> task =
414 OFRpcTaskFactory.createGetFlowStatisticsFromFlowTableTask(rpcTaskContext, input, null);
415 return task.submit();
419 public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> getAggregateFlowStatisticsFromFlowTableForAllFlows(
420 final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
421 LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForAllFlows RPC method on MessageDispatchService");
423 OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> task =
424 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForAllFlowsTask(rpcTaskContext, input, null);
425 return task.submit();
429 public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> getAggregateFlowStatisticsFromFlowTableForGivenMatch(
430 final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
431 LOG.debug("Calling the getAggregateFlowStatisticsFromFlowTableForGivenMatch RPC method on MessageDispatchService");
433 OFRpcTask<GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput, RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> task =
434 OFRpcTaskFactory.createGetAggregateFlowStatisticsFromFlowTableForGivenMatchTask(rpcTaskContext, input, null);
435 return task.submit();
439 public Future<RpcResult<GetFlowTablesStatisticsOutput>> getFlowTablesStatistics(
440 final GetFlowTablesStatisticsInput input) {
441 LOG.debug("Calling the getFlowTablesStatistics RPC method on MessageDispatchService");
443 OFRpcTask<GetFlowTablesStatisticsInput, RpcResult<GetFlowTablesStatisticsOutput>> task =
444 OFRpcTaskFactory.createGetFlowTablesStatisticsTask(rpcTaskContext, input, null);
445 return task.submit();
449 public Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> getAllQueuesStatisticsFromAllPorts(
450 final GetAllQueuesStatisticsFromAllPortsInput input) {
451 LOG.debug("Calling the getAllQueuesStatisticsFromAllPorts RPC method on MessageDispatchService");
453 OFRpcTask<GetAllQueuesStatisticsFromAllPortsInput, RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> task =
454 OFRpcTaskFactory.createGetAllQueuesStatisticsFromAllPortsTask(rpcTaskContext, input, null);
455 return task.submit();
459 public Future<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> getAllQueuesStatisticsFromGivenPort(
460 final GetAllQueuesStatisticsFromGivenPortInput input) {
461 LOG.debug("Calling the getAllQueuesStatisticsFromGivenPort RPC method on MessageDispatchService");
463 OFRpcTask<GetAllQueuesStatisticsFromGivenPortInput, RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> task =
464 OFRpcTaskFactory.createGetAllQueuesStatisticsFromGivenPortTask(rpcTaskContext, input, null);
465 return task.submit();
469 public Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> getQueueStatisticsFromGivenPort(
470 final GetQueueStatisticsFromGivenPortInput input) {
471 LOG.debug("Calling the getQueueStatisticsFromGivenPort RPC method on MessageDispatchService");
473 OFRpcTask<GetQueueStatisticsFromGivenPortInput, RpcResult<GetQueueStatisticsFromGivenPortOutput>> task =
474 OFRpcTaskFactory.createGetQueueStatisticsFromGivenPortTask(rpcTaskContext, input, null);
475 return task.submit();
479 public Future<RpcResult<SetConfigOutput>> setConfig(SetConfigInput input) {
480 OFRpcTask<SetConfigInput, RpcResult<SetConfigOutput>> task = OFRpcTaskFactory.createSetNodeConfigTask(rpcTaskContext, input, null);
481 return task.submit();