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());
}
Aggregations