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