Search in sources :

Example 1 with NxActionOutputRegGrouping

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionOutputRegGrouping in project openflowplugin by opendaylight.

the class OutputRegConvertor method convert.

@Override
public Action convert(final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nxActionArg) {
    Preconditions.checkArgument(nxActionArg instanceof NxActionOutputRegGrouping);
    NxActionOutputRegGrouping nxAction = (NxActionOutputRegGrouping) nxActionArg;
    Src src = nxAction.getNxOutputReg().getSrc();
    final ActionOutputRegBuilder builder = new ActionOutputRegBuilder();
    NxActionOutputRegBuilder nxActionOutputRegBuilder = new NxActionOutputRegBuilder();
    nxActionOutputRegBuilder.setSrc(RegMoveConvertor.resolveSrc(src.getSrcChoice()));
    nxActionOutputRegBuilder.setNBits(src.getOfsNbits());
    nxActionOutputRegBuilder.setMaxLen(nxAction.getNxOutputReg().getMaxLen());
    builder.setNxActionOutputReg(nxActionOutputRegBuilder.build());
    return ActionUtil.createAction(builder.build());
}
Also used : Src(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.nx.output.reg.Src) NxActionOutputRegBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputRegBuilder) ActionOutputRegBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputRegBuilder) NxActionOutputRegBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputRegBuilder) NxActionOutputRegGrouping(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionOutputRegGrouping)

Aggregations

ActionOutputRegBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputRegBuilder)1 NxActionOutputRegBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputRegBuilder)1 NxActionOutputRegGrouping (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionOutputRegGrouping)1 Src (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.nx.output.reg.Src)1