use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class MultiLayerMeterService method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final I input) throws ServiceException {
final Optional<MeterModInputBuilder> ofMeterModInput = convertorExecutor.convert(input, data);
final MeterModInputBuilder meterModInputBuilder = ofMeterModInput.orElse(MeterConvertor.defaultResult(getVersion()));
meterModInputBuilder.setXid(xid.getValue());
return meterModInputBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class FlowCapableTransactionServiceImpl method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final SendBarrierInput input) throws ServiceException {
final BarrierInputBuilder barrierInputOFJavaBuilder = new BarrierInputBuilder();
barrierInputOFJavaBuilder.setVersion(getVersion());
barrierInputOFJavaBuilder.setXid(xid.getValue());
return barrierInputOFJavaBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class PacketProcessingServiceImpl method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final TransmitPacketInput input) throws ServiceException {
final PacketOutConvertorData data = new PacketOutConvertorData(getVersion());
data.setDatapathId(getDatapathId());
data.setXid(xid.getValue());
final Optional<PacketOutInput> result = convertorExecutor.convert(input, data);
return result.orElse(PacketOutConvertor.defaultResult(getVersion()));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader 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();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader in project openflowplugin by opendaylight.
the class NodeConfigServiceImpl method buildRequest.
@Override
protected OfHeader buildRequest(final Xid xid, final SetConfigInput input) throws ServiceException {
SetConfigInputBuilder builder = new SetConfigInputBuilder();
SwitchConfigFlag flag = SwitchConfigFlag.valueOf(input.getFlag());
builder.setXid(xid.getValue());
builder.setFlags(flag);
builder.setMissSendLen(input.getMissSearchLength());
builder.setVersion(getVersion());
return builder.build();
}
Aggregations