use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder in project openflowplugin by opendaylight.
the class GroupStatsService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetGroupStatisticsInput input) throws ServiceException {
final MultipartRequestGroupCaseBuilder caseBuilder = new MultipartRequestGroupCaseBuilder();
final MultipartRequestGroupBuilder mprGroupBuild = new MultipartRequestGroupBuilder();
mprGroupBuild.setGroupId(new GroupId(input.getGroupId().getValue()));
caseBuilder.setMultipartRequestGroup(mprGroupBuild.build());
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPGROUP, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(caseBuilder.build());
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder in project openflowplugin by opendaylight.
the class MeterStatsService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetMeterStatisticsInput input) throws ServiceException {
MultipartRequestMeterCaseBuilder caseBuilder = new MultipartRequestMeterCaseBuilder();
MultipartRequestMeterBuilder mprMeterBuild = new MultipartRequestMeterBuilder();
mprMeterBuild.setMeterId(new MeterId(input.getMeterId().getValue()));
caseBuilder.setMultipartRequestMeter(mprMeterBuild.build());
MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPMETER, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(caseBuilder.build());
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder in project openflowplugin by opendaylight.
the class PortStatsService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetNodeConnectorStatisticsInput input) throws ServiceException {
MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
MultipartRequestPortStatsBuilder mprPortStatsBuilder = new MultipartRequestPortStatsBuilder();
// Set specific port
final short version = getVersion();
mprPortStatsBuilder.setPortNo(InventoryDataServiceUtil.portNumberfromNodeConnectorId(OpenflowVersion.get(version), input.getNodeConnectorId()));
caseBuilder.setMultipartRequestPortStats(mprPortStatsBuilder.build());
MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), version);
mprInput.setMultipartRequestBody(caseBuilder.build());
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder in project openflowplugin by opendaylight.
the class AllFlowsInAllTablesService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetAllFlowsStatisticsFromAllFlowTablesInput input) throws ServiceException {
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPFLOW, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(flowCase);
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder in project openflowplugin by opendaylight.
the class AllGroupsStatsService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetAllGroupStatisticsInput input) throws ServiceException {
// Create multipart request header
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPGROUP, xid.getValue(), getVersion());
// Set request body to main multipart request
mprInput.setMultipartRequestBody(GROUP_CASE);
// Send the request, no cookies associated, use any connection
return mprInput.build();
}
Aggregations