use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader 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();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class AllQueuesAllPortsService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetAllQueuesStatisticsFromAllPortsInput input) throws ServiceException {
// Set request body to main multipart request
MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPQUEUE, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(QUEUE_CASE);
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class GroupFeaturesService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetGroupFeaturesInput input) throws ServiceException {
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPGROUPFEATURES, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(GROUP_FEAT_CASE);
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class OpendaylightFlowTableStatisticsServiceImpl method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final GetFlowTablesStatisticsInput input) throws ServiceException {
// Create multipart request body for fetch all the group stats
final MultipartRequestTableCaseBuilder multipartRequestTableCaseBuilder = new MultipartRequestTableCaseBuilder();
final MultipartRequestTableBuilder multipartRequestTableBuilder = new MultipartRequestTableBuilder();
multipartRequestTableBuilder.setEmpty(true);
multipartRequestTableCaseBuilder.setMultipartRequestTable(multipartRequestTableBuilder.build());
// Set request body to main multipart request
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(MultipartType.OFPMPTABLE, xid.getValue(), getVersion());
mprInput.setMultipartRequestBody(multipartRequestTableCaseBuilder.build());
return mprInput.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class SingleLayerGroupService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final Group input) throws ServiceException {
final GroupMessageBuilder groupMessageBuilder = new GroupMessageBuilder(input);
final Class<? extends DataContainer> clazz = input.getImplementedInterface();
if (clazz.equals(AddGroupInput.class)) {
groupMessageBuilder.setCommand(GroupModCommand.OFPGCADD);
} else if (clazz.equals(UpdatedGroup.class)) {
groupMessageBuilder.setCommand(GroupModCommand.OFPGCMODIFY);
} else if (clazz.equals(RemoveGroupInput.class) || clazz.equals(OriginalGroup.class)) {
groupMessageBuilder.setCommand(GroupModCommand.OFPGCDELETE);
}
return groupMessageBuilder.setVersion(getVersion()).setXid(xid.getValue()).build();
}
Aggregations