use of org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.remove.flows.batch.input.BatchRemoveFlowsBuilder in project openflowplugin by opendaylight.
the class FlatBatchFlowAdapters method adaptFlatBatchRemoveFlow.
/**
* Adapt flat batch remove flow.
* @param planStep batch step containing changes of the same type
* @param node pointer for RPC routing
* @return input suitable for {@link org.opendaylight.yang.gen.v1.urn
* .opendaylight.flows.service.rev160314.SalFlowsBatchService#removeFlowsBatch(RemoveFlowsBatchInput)}
*/
public static RemoveFlowsBatchInput adaptFlatBatchRemoveFlow(final BatchPlanStep planStep, final NodeRef node) {
final List<BatchRemoveFlows> batchFlows = new ArrayList<>();
for (FlatBatchRemoveFlow batchRemoveFlow : planStep.<FlatBatchRemoveFlow>getTaskBag()) {
final BatchRemoveFlows removeFlows = new BatchRemoveFlowsBuilder((Flow) batchRemoveFlow).setFlowId(batchRemoveFlow.getFlowId()).build();
batchFlows.add(removeFlows);
}
return new RemoveFlowsBatchInputBuilder().setBarrierAfter(planStep.isBarrierAfter()).setNode(node).setBatchRemoveFlows(batchFlows).build();
}
Aggregations