use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.NxActionRegMoveGrouping in project openflowplugin by opendaylight.
the class RegMoveConvertor method convert.
@Override
public Action convert(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nxActionArg) {
Preconditions.checkArgument(nxActionArg instanceof NxActionRegMoveGrouping);
NxActionRegMoveGrouping nxAction = (NxActionRegMoveGrouping) nxActionArg;
Dst dst = nxAction.getNxRegMove().getDst();
Src src = nxAction.getNxRegMove().getSrc();
final ActionRegMoveBuilder actionRegMoveBuilder = new ActionRegMoveBuilder();
NxActionRegMoveBuilder nxActionRegMove = new NxActionRegMoveBuilder();
nxActionRegMove.setDst(resolveDst(dst.getDstChoice()));
nxActionRegMove.setDstOfs(dst.getStart());
nxActionRegMove.setSrc(resolveSrc(src.getSrcChoice()));
nxActionRegMove.setSrcOfs(src.getStart());
nxActionRegMove.setNBits(dst.getEnd() - dst.getStart() + 1);
actionRegMoveBuilder.setNxActionRegMove(nxActionRegMove.build());
return ActionUtil.createAction(actionRegMoveBuilder.build());
}
Aggregations