use of org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetMeterStatisticsOutputBuilder in project openflowplugin by opendaylight.
the class MeterDirectStatisticsService method buildReply.
@Override
protected GetMeterStatisticsOutput buildReply(List<MultipartReply> input, boolean success) {
final List<MeterStats> meterStats = new ArrayList<>();
if (success) {
for (final MultipartReply mpReply : input) {
final MultipartReplyMeterCase caseBody = (MultipartReplyMeterCase) mpReply.getMultipartReplyBody();
final MultipartReplyMeter replyBody = caseBody.getMultipartReplyMeter();
final Optional<List<MeterStats>> meterStatsList = getConvertorExecutor().convert(replyBody.getMeterStats(), data);
meterStatsList.ifPresent(meterStats::addAll);
}
}
return new GetMeterStatisticsOutputBuilder().setMeterStats(meterStats).build();
}
Aggregations