use of org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetGroupStatisticsOutputBuilder in project openflowplugin by opendaylight.
the class GroupDirectStatisticsService method buildReply.
@Override
protected GetGroupStatisticsOutput buildReply(List<MultipartReply> input, boolean success) {
final List<GroupStats> groupStats = new ArrayList<>();
if (success) {
for (final MultipartReply mpReply : input) {
final MultipartReplyGroupCase caseBody = (MultipartReplyGroupCase) mpReply.getMultipartReplyBody();
final MultipartReplyGroup replyBody = caseBody.getMultipartReplyGroup();
final Optional<List<GroupStats>> groupStatsList = getConvertorExecutor().convert(replyBody.getGroupStats(), data);
groupStatsList.ifPresent(groupStats::addAll);
}
}
return new GetGroupStatisticsOutputBuilder().setGroupStats(groupStats).build();
}
Aggregations