use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput 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);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAllFlowStatisticsFromFlowTableInput in project openflowplugin by opendaylight.
the class AllFlowsInTableService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetAllFlowStatisticsFromFlowTableInput input) throws ServiceException {
final MultipartRequestFlowBuilder mprFlowRequestBuilder = new MultipartRequestFlowBuilder();
mprFlowRequestBuilder.setTableId(input.getTableId().getValue());
mprFlowRequestBuilder.setOutPort(OFConstants.OFPP_ANY);
mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
final short version = getVersion();
FlowCreatorUtil.setWildcardedFlowMatch(version, mprFlowRequestBuilder);
final MultipartRequestFlowCaseBuilder multipartRequestFlowCaseBuilder = new MultipartRequestFlowCaseBuilder();
multipartRequestFlowCaseBuilder.setMultipartRequestFlow(mprFlowRequestBuilder.build());
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPFLOW, xid.getValue(), version);
mprInput.setMultipartRequestBody(multipartRequestFlowCaseBuilder.build());
return mprInput.build();
}
Aggregations