use of org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.batch.failure.batch.item.id.choice.FlatBatchFailureGroupIdCaseBuilder in project openflowplugin by opendaylight.
the class FlatBatchGroupAdapters method wrapBatchGroupFailuresForFlat.
private static <T extends BatchGroupOutputListGrouping> List<BatchFailure> wrapBatchGroupFailuresForFlat(final RpcResult<T> input, final int stepOffset) {
final List<BatchFailure> batchFailures = new ArrayList<>();
if (input.getResult().getBatchFailedGroupsOutput() != null) {
for (BatchFailedGroupsOutput stepOutput : input.getResult().getBatchFailedGroupsOutput()) {
final BatchFailure batchFailure = new BatchFailureBuilder().setBatchOrder(stepOffset + stepOutput.getBatchOrder()).setBatchItemIdChoice(new FlatBatchFailureGroupIdCaseBuilder().setGroupId(stepOutput.getGroupId()).build()).build();
batchFailures.add(batchFailure);
}
}
return batchFailures;
}
Aggregations