use of org.opendaylight.yang.gen.v1.urn.opendaylight.bulk.flow.service.rev150608.BulkFlowBaseContentGrouping in project openflowplugin by opendaylight.
the class SalBulkFlowServiceImpl method addFlowsRpc.
@Override
public Future<RpcResult<Void>> addFlowsRpc(AddFlowsRpcInput input) {
List<ListenableFuture<RpcResult<AddFlowOutput>>> bulkResults = new ArrayList<>();
for (BulkFlowBaseContentGrouping bulkFlow : input.getBulkFlowItem()) {
AddFlowInputBuilder flowInputBuilder = new AddFlowInputBuilder((org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow) bulkFlow);
final NodeRef nodeRef = bulkFlow.getNode();
flowInputBuilder.setNode(nodeRef);
flowInputBuilder.setTableId(bulkFlow.getTableId());
Future<RpcResult<AddFlowOutput>> rpcAddFlowResult = flowService.addFlow(flowInputBuilder.build());
bulkResults.add(JdkFutureAdapters.listenInPoolThread(rpcAddFlowResult));
}
return handleResultFuture(Futures.allAsList(bulkResults));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.bulk.flow.service.rev150608.BulkFlowBaseContentGrouping in project openflowplugin by opendaylight.
the class SalBulkFlowServiceImpl method removeFlowsRpc.
@Override
public Future<RpcResult<Void>> removeFlowsRpc(RemoveFlowsRpcInput input) {
List<ListenableFuture<RpcResult<RemoveFlowOutput>>> bulkResults = new ArrayList<>();
for (BulkFlowBaseContentGrouping bulkFlow : input.getBulkFlowItem()) {
RemoveFlowInputBuilder flowInputBuilder = new RemoveFlowInputBuilder((org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow) bulkFlow);
final NodeRef nodeRef = bulkFlow.getNode();
flowInputBuilder.setNode(nodeRef);
flowInputBuilder.setTableId(bulkFlow.getTableId());
Future<RpcResult<RemoveFlowOutput>> rpcAddFlowResult = flowService.removeFlow(flowInputBuilder.build());
bulkResults.add(JdkFutureAdapters.listenInPoolThread(rpcAddFlowResult));
}
return handleResultFuture(Futures.allAsList(bulkResults));
}
Aggregations