Search in sources :

Example 1 with GetAllFlowStatisticsFromFlowTableInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInputBuilder 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)

Example 2 with GetAllFlowStatisticsFromFlowTableInputBuilder

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

the class OpendaylightFlowStatisticsServiceImpl3Test method testGetAllFlowStatisticsFromFlowTable.

@Test
public void testGetAllFlowStatisticsFromFlowTable() throws Exception {
    GetAllFlowStatisticsFromFlowTableInput input = new GetAllFlowStatisticsFromFlowTableInputBuilder().setNode(createNodeRef("unitProt:123")).setTableId(new TableId((short) 1)).build();
    flowStatisticsService.getAllFlowStatisticsFromFlowTable(input);
    Mockito.verify(flowStatisticsDelegate).getAllFlowStatisticsFromFlowTable(input);
}
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) GetAllFlowStatisticsFromFlowTableInput(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput) Test(org.junit.Test)

Example 3 with GetAllFlowStatisticsFromFlowTableInputBuilder

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

the class OpendaylightFlowStatisticsServiceImpl1Test method testGetAllFlowStatisticsFromFlowTable.

@Test(expected = IllegalAccessError.class)
public void testGetAllFlowStatisticsFromFlowTable() throws Exception {
    GetAllFlowStatisticsFromFlowTableInputBuilder input = new GetAllFlowStatisticsFromFlowTableInputBuilder().setNode(createNodeRef("unitProt:123")).setTableId(new TableId((short) 1));
    flowStatisticsService.getAllFlowStatisticsFromFlowTable(input.build());
}
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) Test(org.junit.Test)

Aggregations

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