use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdatedBuilder in project openflowplugin by opendaylight.
the class GroupFeaturesService method transformToNotification.
@Override
public GroupFeaturesUpdated transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
final int mpSize = result.size();
Preconditions.checkArgument(mpSize == 1, "unexpected (!=1) mp-reply size received: {}", mpSize);
GroupFeaturesUpdatedBuilder notification = new GroupFeaturesUpdatedBuilder();
notification.setId(getDeviceInfo().getNodeId());
notification.setMoreReplies(Boolean.FALSE);
notification.setTransactionId(emulatedTxId);
MultipartReplyGroupFeaturesCase caseBody = (MultipartReplyGroupFeaturesCase) result.get(0).getMultipartReplyBody();
MultipartReplyGroupFeatures replyBody = caseBody.getMultipartReplyGroupFeatures();
notification.setGroupTypesSupported(extractSupportedGroupTypes(replyBody.getTypes()));
notification.setMaxGroups(replyBody.getMaxGroups());
notification.setGroupCapabilitiesSupported(extractSupportedCapabilities(replyBody.getCapabilities()));
notification.setActions(GroupUtil.extractGroupActionsSupportBitmap(replyBody.getActionsBitmap()));
return notification.build();
}
Aggregations