Search in sources :

Example 1 with GetQueueStatisticsFromGivenPortOutput

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

the class OpendaylightQueueStatisticsServiceImplTest method testGetQueueStatisticsFromGivenPort.

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

Aggregations

FutureCallback (com.google.common.util.concurrent.FutureCallback)1 Test (org.junit.Test)1 QueueId (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.queue.rev130925.QueueId)1 NodeConnectorId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId)1 GetQueueStatisticsFromGivenPortInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortInputBuilder)1 GetQueueStatisticsFromGivenPortOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortOutput)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1