use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder in project openflowplugin by opendaylight.
the class ResubmitCodecTest method createAction.
private Action createAction(Short inPort, Byte table) {
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
ActionResubmitBuilder actionResubmitBuilder = new ActionResubmitBuilder();
NxActionResubmitBuilder nxActionResubmitBuilder = new NxActionResubmitBuilder();
if (inPort != null) {
nxActionResubmitBuilder.setInPort(inPort.intValue());
}
if (table != null) {
nxActionResubmitBuilder.setTable(table.shortValue());
}
actionResubmitBuilder.setNxActionResubmit(nxActionResubmitBuilder.build());
actionBuilder.setActionChoice(actionResubmitBuilder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder in project openflowplugin by opendaylight.
the class ResubmitCodec method deserialize.
@Override
public Action deserialize(final ByteBuf message) {
final ActionBuilder actionBuilder = deserializeHeader(message);
ActionResubmitBuilder builder = new ActionResubmitBuilder();
NxActionResubmitBuilder nxActionResubmitBuilder = new NxActionResubmitBuilder();
nxActionResubmitBuilder.setInPort(message.readUnsignedShort());
nxActionResubmitBuilder.setTable(message.readUnsignedByte());
builder.setNxActionResubmit(nxActionResubmitBuilder.build());
message.skipBytes(PADDING);
actionBuilder.setActionChoice(builder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder in project openflowplugin by opendaylight.
the class ResubmitConvertor method convert.
@Override
public Action convert(final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nxActionArg) {
Preconditions.checkArgument(nxActionArg instanceof NxActionResubmitGrouping);
NxActionResubmitGrouping nxAction = (NxActionResubmitGrouping) nxActionArg;
ActionResubmitBuilder builder = new ActionResubmitBuilder();
NxActionResubmitBuilder nxActionResubmitBuilder = new NxActionResubmitBuilder();
nxActionResubmitBuilder.setInPort(nxAction.getNxResubmit().getInPort());
nxActionResubmitBuilder.setTable(nxAction.getNxResubmit().getTable());
builder.setNxActionResubmit(nxActionResubmitBuilder.build());
return ActionUtil.createAction(builder.build());
}
Aggregations