Search in sources :

Example 1 with NxActionResubmitBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder 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();
}
Also used : ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder) NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder) ExperimenterId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId) ActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder) NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder)

Example 2 with NxActionResubmitBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder 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();
}
Also used : ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder) NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder) ActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder) NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder)

Example 3 with NxActionResubmitBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder 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());
}
Also used : NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder) NxActionResubmitGrouping(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionResubmitGrouping) ActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder) NxActionResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder)

Aggregations

ActionResubmitBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmitBuilder)3 NxActionResubmitBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmitBuilder)3 ActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder)2 ExperimenterId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId)1 NxActionResubmitGrouping (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionResubmitGrouping)1