use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.DstBuilder in project openflowplugin by opendaylight.
the class RegLoadConvertor method convert.
@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action convert(final Action input, final ActionPath path) {
NxActionRegLoad actionRegLoad = ((ActionRegLoad) input.getActionChoice()).getNxActionRegLoad();
DstBuilder dstBuilder = new DstBuilder();
dstBuilder.setDstChoice(RegMoveConvertor.resolveDstValue(actionRegLoad.getDst()));
dstBuilder.setStart(resolveStart(actionRegLoad.getOfsNbits()));
dstBuilder.setEnd(resolveEnd(actionRegLoad.getOfsNbits()));
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder();
nxRegLoadBuilder.setDst(dstBuilder.build());
nxRegLoadBuilder.setValue(actionRegLoad.getValue());
return resolveAction(nxRegLoadBuilder.build(), path);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.DstBuilder in project genius by opendaylight.
the class MDSALUtil method createSetReg6Action.
/**
* Create action to set REG6 to the given value.
*
* @param actionKey the action key.
* @param startOffSet the start offset.
* @param endOffSet the end offset.
* @param value the value.
* @return the action.
*/
public static Action createSetReg6Action(int actionKey, int startOffSet, int endOffSet, long value) {
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder();
Dst dst = new DstBuilder().setDstChoice(new DstNxRegCaseBuilder().setNxReg(NxmNxReg6.class).build()).setStart(startOffSet).setEnd(endOffSet).build();
nxRegLoadBuilder.setDst(dst);
nxRegLoadBuilder.setValue(new BigInteger(Long.toString(value)));
ActionBuilder ab = new ActionBuilder();
ab.setAction(new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build());
ab.setKey(new ActionKey(actionKey));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.DstBuilder in project genius by opendaylight.
the class ActionMoveSourceDestinationIp method buildAction.
@Override
public Action buildAction(int newActionKey) {
ActionBuilder ab = new ActionBuilder();
NxRegMove regMove = new NxRegMoveBuilder().setSrc(new SrcBuilder().setSrcChoice(new SrcOfIpSrcCaseBuilder().setOfIpSrc(Boolean.TRUE).build()).setStart(0).build()).setDst(new DstBuilder().setDstChoice(new DstOfIpDstCaseBuilder().setOfIpDst(Boolean.TRUE).build()).setStart(0).setEnd(31).build()).build();
ab.setAction(new NxActionRegMoveNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegMove(regMove).build());
ab.setKey(new ActionKey(newActionKey));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.DstBuilder in project genius by opendaylight.
the class ActionMoveSourceDestinationIpv6 method buildAction.
@Override
public Action buildAction(int newActionKey) {
ActionBuilder ab = new ActionBuilder();
NxRegMove regMove = new NxRegMoveBuilder().setSrc(new SrcBuilder().setSrcChoice(new SrcNxIpv6SrcCaseBuilder().setNxIpv6Src(Boolean.TRUE).build()).setStart(0).build()).setDst(new DstBuilder().setDstChoice(new DstNxIpv6DstCaseBuilder().setNxIpv6Dst(Boolean.TRUE).build()).setStart(0).setEnd(127).build()).build();
ab.setAction(new NxActionRegMoveNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegMove(regMove).build());
ab.setKey(new ActionKey(newActionKey));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.DstBuilder in project genius by opendaylight.
the class ActionRegLoad method buildAction.
@Override
public Action buildAction(int newActionKey) {
Dst dst = new DstBuilder().setDstChoice(new DstNxRegCaseBuilder().setNxReg(register).build()).setStart(start).setEnd(end).build();
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder().setDst(dst).setValue(BigInteger.valueOf(load));
return new ActionBuilder().setAction(new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build()).setKey(new ActionKey(newActionKey)).build();
}
Aggregations