Search in sources :

Example 1 with GroupFeaturesUpdatedBuilder

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();
}
Also used : MultipartReplyGroupFeaturesCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCase) GroupFeaturesUpdatedBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdatedBuilder) MultipartReplyGroupFeatures(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeatures)

Aggregations

GroupFeaturesUpdatedBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdatedBuilder)1 MultipartReplyGroupFeaturesCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCase)1 MultipartReplyGroupFeatures (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeatures)1