Search in sources :

Example 1 with MultipartRequestGroupStats

use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupStats in project openflowplugin by opendaylight.

the class GroupDirectStatisticsServiceTest method testBuildRequestBody.

@Override
public void testBuildRequestBody() throws Exception {
    final GetGroupStatisticsInput input = mock(GetGroupStatisticsInput.class);
    when(input.getNode()).thenReturn(createNodeRef(NODE_ID));
    when(input.getGroupId()).thenReturn(new GroupId(GROUP_NO));
    final MultipartRequestGroupStats body = (MultipartRequestGroupStats) ((MultipartRequest) service.buildRequest(new Xid(42L), input)).getMultipartRequestBody();
    assertEquals(GROUP_NO, body.getGroupId().getValue());
}
Also used : Xid(org.opendaylight.openflowplugin.api.openflow.device.Xid) GetGroupStatisticsInput(org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetGroupStatisticsInput) MultipartRequestGroupStats(org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupStats) GroupId(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId)

Aggregations

Xid (org.opendaylight.openflowplugin.api.openflow.device.Xid)1 GetGroupStatisticsInput (org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetGroupStatisticsInput)1 MultipartRequestGroupStats (org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.multipart.request.multipart.request.body.MultipartRequestGroupStats)1 GroupId (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId)1