use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.acl.live.statistics.rev161129.GetAclPortStatisticsInputBuilder in project netvirt by opendaylight.
the class AclLiveStatisticsRpcServiceTest method getStatsTwoPortBothDirection.
/**
* Test stats for two ports and both direction. <br>
* port1 is valid <br>
* port2 is invalid <br>
* Expectation: Error expected for port2
*
* @throws Exception the exception
*/
@Test
public void getStatsTwoPortBothDirection() throws Exception {
List<String> lstInterfaces = Arrays.asList(PORT_1, PORT_2);
Direction direction = Direction.Both;
GetAclPortStatisticsInput input = new GetAclPortStatisticsInputBuilder().setDirection(direction).setInterfaceNames(lstInterfaces).build();
Future<RpcResult<GetAclPortStatisticsOutput>> rpcResultFuture = aclStatsService.getAclPortStatistics(input);
RpcResult<GetAclPortStatisticsOutput> output = rpcResultFuture.get();
LOG.info("getStatsTwoPortBothDirection output = {}", output);
assertStatsOutput(output, direction);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.acl.live.statistics.rev161129.GetAclPortStatisticsInputBuilder in project netvirt by opendaylight.
the class AclLiveStatisticsRpcServiceTest method getStatsTwoPortEgressOnly.
/**
* Test stats for two ports and egress direction only. <br>
* port1 is valid <br>
* port2 is invalid <br>
* Expectation: Error expected for port2. Drop stats should be available for
* egress direction only.
*
* @throws Exception the exception
*/
@Test
public void getStatsTwoPortEgressOnly() throws Exception {
List<String> lstInterfaces = Arrays.asList(PORT_1, PORT_2);
Direction direction = Direction.Egress;
GetAclPortStatisticsInput input = new GetAclPortStatisticsInputBuilder().setDirection(direction).setInterfaceNames(lstInterfaces).build();
Future<RpcResult<GetAclPortStatisticsOutput>> rpcResultFuture = aclStatsService.getAclPortStatistics(input);
RpcResult<GetAclPortStatisticsOutput> output = rpcResultFuture.get();
LOG.info("getStatsTwoPortEgressOnly output = {}", output);
assertStatsOutput(output, direction);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.acl.live.statistics.rev161129.GetAclPortStatisticsInputBuilder in project netvirt by opendaylight.
the class AclLiveStatisticsRpcServiceTest method getStatsOnePortBothDirection.
/**
* Test stats for one port and both direction. <br>
* port1 is valid <br>
* Expectation: This is a success case.
*
* @throws Exception the exception
*/
@Test
public void getStatsOnePortBothDirection() throws Exception {
List<String> lstInterfaces = Arrays.asList(PORT_1);
Direction direction = Direction.Both;
GetAclPortStatisticsInput input = new GetAclPortStatisticsInputBuilder().setDirection(direction).setInterfaceNames(lstInterfaces).build();
Future<RpcResult<GetAclPortStatisticsOutput>> rpcResultFuture = aclStatsService.getAclPortStatistics(input);
RpcResult<GetAclPortStatisticsOutput> output = rpcResultFuture.get();
LOG.info("getStatsOnePortBothDirection output = {}", output);
assertStatsOutput(output, direction);
}
Aggregations