Search in sources :

Example 1 with GetAllQueuesStatisticsFromAllPortsInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInputBuilder in project openflowplugin by opendaylight.

the class OpendaylightQueueStatisticsServiceImplTest method testGetAllQueuesStatisticsFromAllPorts.

@Test
public void testGetAllQueuesStatisticsFromAllPorts() throws Exception {
    Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider).commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
    GetAllQueuesStatisticsFromAllPortsInputBuilder input = new GetAllQueuesStatisticsFromAllPortsInputBuilder().setNode(createNodeRef("unitProt:123"));
    rpcResult = buildQueueStatsReply();
    final Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> resultFuture = queueStatisticsService.getAllQueuesStatisticsFromAllPorts(input.build());
    Assert.assertTrue(resultFuture.isDone());
    final RpcResult<GetAllQueuesStatisticsFromAllPortsOutput> rpcResult = resultFuture.get();
    Assert.assertTrue(rpcResult.isSuccessful());
    Assert.assertEquals(MultipartType.OFPMPQUEUE, requestInput.getValue().getType());
}
Also used : GetAllQueuesStatisticsFromAllPortsInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInputBuilder) GetAllQueuesStatisticsFromAllPortsOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsOutput) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) FutureCallback(com.google.common.util.concurrent.FutureCallback) Test(org.junit.Test)

Aggregations

FutureCallback (com.google.common.util.concurrent.FutureCallback)1 Test (org.junit.Test)1 GetAllQueuesStatisticsFromAllPortsInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInputBuilder)1 GetAllQueuesStatisticsFromAllPortsOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsOutput)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1