use of org.openkilda.floodlight.error.SwitchMissingGroupException in project open-kilda by telstra.
the class GroupVerifyCommand method handleGroupStats.
private MirrorConfig handleGroupStats(List<OFGroupDescStatsReply> groupDescStatsReply) {
OFGroupDescStatsEntry target = null;
List<OFGroupDescStatsEntry> groupDescStatsEntries = groupDescStatsReply.stream().map(OFGroupDescStatsReply::getEntries).flatMap(List::stream).collect(toList());
for (OFGroupDescStatsEntry entry : groupDescStatsEntries) {
if (mirrorConfig.getGroupId().intValue() == entry.getGroup().getGroupNumber()) {
target = entry;
break;
}
}
if (target == null) {
throw maskCallbackException(new SwitchMissingGroupException(getSw().getId(), mirrorConfig.getGroupId()));
}
validateGroupConfig(target);
return mirrorConfig;
}
Aggregations