use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoadBuilder 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.load.grouping.NxRegLoadBuilder 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