Search in sources :

Example 1 with GetAllQueuesStatisticsFromGivenPortOutput

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

the class OpendaylightQueueStatisticsServiceImplTest method testGetAllQueuesStatisticsFromGivenPort.

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

Aggregations

FutureCallback (com.google.common.util.concurrent.FutureCallback)1 Test (org.junit.Test)1 NodeConnectorId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId)1 GetAllQueuesStatisticsFromGivenPortInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortInputBuilder)1 GetAllQueuesStatisticsFromGivenPortOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortOutput)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1