Search in sources :

Example 1 with FlatBatchFailureMeterIdCaseBuilder

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;
}
Also used : BatchFailure(org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.BatchFailure) BatchFailureBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.BatchFailureBuilder) ArrayList(java.util.ArrayList) BatchFailedMetersOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.meters.service.rev160316.batch.meter.output.list.grouping.BatchFailedMetersOutput) FlatBatchFailureMeterIdCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.batch.failure.batch.item.id.choice.FlatBatchFailureMeterIdCaseBuilder)

Aggregations

ArrayList (java.util.ArrayList)1 BatchFailure (org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.BatchFailure)1 BatchFailureBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.BatchFailureBuilder)1 FlatBatchFailureMeterIdCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.output.batch.failure.batch.item.id.choice.FlatBatchFailureMeterIdCaseBuilder)1 BatchFailedMetersOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.meters.service.rev160316.batch.meter.output.list.grouping.BatchFailedMetersOutput)1