use of org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.update.flows.batch.input.BatchUpdateFlowsBuilder in project openflowplugin by opendaylight.
the class SalFlowsBatchServiceImplTest method createEmptyBatchUpdateFlow.
private static BatchUpdateFlows createEmptyBatchUpdateFlow(final String flowIdValue, final int priority) {
final BatchAddFlows emptyOriginalFlow = createEmptyBatchAddFlow(flowIdValue, priority);
final BatchAddFlows emptyUpdatedFlow = createEmptyBatchAddFlow(flowIdValue, priority + 1);
return new BatchUpdateFlowsBuilder().setFlowId(new FlowId(flowIdValue)).setOriginalBatchedFlow(new OriginalBatchedFlowBuilder(emptyOriginalFlow).build()).setUpdatedBatchedFlow(new UpdatedBatchedFlowBuilder(emptyUpdatedFlow).build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flows.service.rev160314.update.flows.batch.input.BatchUpdateFlowsBuilder in project openflowplugin by opendaylight.
the class FlatBatchFlowAdapters method adaptFlatBatchUpdateFlow.
/**
* Adapt flat batch update 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#updateFlowsBatch(UpdateFlowsBatchInput)}
*/
public static UpdateFlowsBatchInput adaptFlatBatchUpdateFlow(final BatchPlanStep planStep, final NodeRef node) {
final List<BatchUpdateFlows> batchFlows = new ArrayList<>();
for (FlatBatchUpdateFlow batchUpdateFlow : planStep.<FlatBatchUpdateFlow>getTaskBag()) {
final BatchUpdateFlows updateFlows = new BatchUpdateFlowsBuilder(batchUpdateFlow).build();
batchFlows.add(updateFlows);
}
return new UpdateFlowsBatchInputBuilder().setBarrierAfter(planStep.isBarrierAfter()).setNode(node).setBatchUpdateFlows(batchFlows).build();
}
Aggregations