Search in sources :

Example 1 with GetGroupFeaturesOutput

use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesOutput in project openflowplugin by opendaylight.

the class OpendaylightGroupStatisticsServiceImplTest method testGetGroupFeatures.

@Test
public void testGetGroupFeatures() throws Exception {
    GetGroupFeaturesInputBuilder input = new GetGroupFeaturesInputBuilder().setNode(createNodeRef("unitProt:123"));
    rpcResult = RpcResultBuilder.<Object>success(Collections.singletonList(new MultipartReplyMessageBuilder().setVersion(OFConstants.OFP_VERSION_1_3).setMultipartReplyBody(new MultipartReplyGroupFeaturesCaseBuilder().setMultipartReplyGroupFeatures(new MultipartReplyGroupFeaturesBuilder().setActionsBitmap(Collections.singletonList(new ActionType(true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false))).setCapabilities(new GroupCapabilities(true, false, false, false)).setTypes(new GroupTypes(true, false, false, false)).setMaxGroups(Collections.singletonList(5L)).build()).build()).build())).build();
    final Future<RpcResult<GetGroupFeaturesOutput>> resultFuture = groupStatisticsService.getGroupFeatures(input.build());
    Assert.assertTrue(resultFuture.isDone());
    final RpcResult<GetGroupFeaturesOutput> rpcResult = resultFuture.get();
    Assert.assertTrue(rpcResult.isSuccessful());
    Assert.assertEquals(MultipartType.OFPMPGROUPFEATURES, requestInput.getValue().getType());
}
Also used : MultipartReplyGroupFeaturesCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCaseBuilder) GroupTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupTypes) GetGroupFeaturesOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesOutput) GroupCapabilities(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupCapabilities) ActionType(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType) MultipartReplyMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder) GetGroupFeaturesInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) MultipartReplyGroupFeaturesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeaturesBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 GetGroupFeaturesInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesInputBuilder)1 GetGroupFeaturesOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupFeaturesOutput)1 ActionType (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType)1 GroupCapabilities (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupCapabilities)1 GroupTypes (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupTypes)1 MultipartReplyMessageBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder)1 MultipartReplyGroupFeaturesCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCaseBuilder)1 MultipartReplyGroupFeaturesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeaturesBuilder)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1