Search in sources :

Example 1 with GetAllFlowStatisticsFromFlowTableOutput

use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableOutput in project openflowplugin by opendaylight.

the class OpendaylightFlowStatisticsServiceDelegateImplTest method testGetAllFlowStatisticsFromFlowTable.

@Test
public void testGetAllFlowStatisticsFromFlowTable() throws Exception {
    GetAllFlowStatisticsFromFlowTableInputBuilder input = new GetAllFlowStatisticsFromFlowTableInputBuilder().setNode(createNodeRef("unitProt:123")).setTableId(new TableId((short) 1));
    rpcResult = buildFlowStatsReply();
    final Future<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> resultFuture = flowStatisticsServiceDelegate.getAllFlowStatisticsFromFlowTable(input.build());
    Assert.assertTrue(resultFuture.isDone());
    final RpcResult<GetAllFlowStatisticsFromFlowTableOutput> rpcResultCompatible = resultFuture.get();
    Assert.assertTrue(rpcResultCompatible.isSuccessful());
    Assert.assertEquals(MultipartType.OFPMPFLOW, requestInput.getValue().getType());
    Mockito.verify(notificationPublishService, Mockito.timeout(NOTIFICATION_WAIT_TIMEOUT_MS)).offerNotification(Matchers.any(Notification.class));
}
Also used : TableId(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableId) GetAllFlowStatisticsFromFlowTableInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) GetAllFlowStatisticsFromFlowTableOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableOutput) Notification(org.opendaylight.yangtools.yang.binding.Notification) AbstractSingleStatsServiceTest(org.opendaylight.openflowplugin.impl.statistics.services.AbstractSingleStatsServiceTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 AbstractSingleStatsServiceTest (org.opendaylight.openflowplugin.impl.statistics.services.AbstractSingleStatsServiceTest)1 GetAllFlowStatisticsFromFlowTableInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInputBuilder)1 GetAllFlowStatisticsFromFlowTableOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableOutput)1 TableId (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableId)1 Notification (org.opendaylight.yangtools.yang.binding.Notification)1 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)1