use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder in project genius by opendaylight.
the class MDSALUtil method createNxOfInPortAction.
public static Action createNxOfInPortAction(final int actionKey, final int inPortVal) {
NxRegLoad regLoad = new NxRegLoadBuilder().setDst(new DstBuilder().setDstChoice(new DstNxOfInPortCaseBuilder().setOfInPort(Boolean.TRUE).build()).setStart(0).setEnd(15).build()).setValue(BigInteger.valueOf(inPortVal)).build();
ActionBuilder abExt = new ActionBuilder();
abExt.setKey(new ActionKey(actionKey));
abExt.setOrder(actionKey);
abExt.setAction(new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegLoad(regLoad).build());
return abExt.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder in project genius by opendaylight.
the class ActionSetTunnelDestinationIp method buildAction.
@Override
public Action buildAction(int newActionKey) {
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder();
Dst dst = new DstBuilder().setDstChoice(new DstNxTunIpv4DstCaseBuilder().setNxTunIpv4Dst(Boolean.TRUE).build()).setStart(0).setEnd(31).build();
nxRegLoadBuilder.setDst(dst);
nxRegLoadBuilder.setValue(destIp);
ActionBuilder ab = new ActionBuilder();
if (groupBucket) {
ab.setAction(new NxActionRegLoadNodesNodeGroupBucketsBucketActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build());
} else {
ab.setAction(new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build());
}
ab.setKey(new ActionKey(newActionKey));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder in project genius by opendaylight.
the class ActionSetTunnelSourceIp method buildAction.
@Override
public Action buildAction(int newActionKey) {
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder();
Dst dst = new DstBuilder().setDstChoice(new DstNxTunIpv4SrcCaseBuilder().setNxTunIpv4Src(Boolean.TRUE).build()).setStart(0).setEnd(31).build();
nxRegLoadBuilder.setDst(dst);
nxRegLoadBuilder.setValue(sourceIp);
ActionBuilder ab = new ActionBuilder();
if (groupBucket) {
ab.setAction(new NxActionRegLoadNodesNodeGroupBucketsBucketActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build());
} else {
ab.setAction(new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder().setNxRegLoad(nxRegLoadBuilder.build()).build());
}
ab.setKey(new ActionKey(newActionKey));
return ab.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder in project openflowplugin by opendaylight.
the class Test method createNxActionBld.
private static ActionBuilder createNxActionBld(int actionKeyVal) {
// vendor part
DstNxRegCaseBuilder nxRegCaseBld = new DstNxRegCaseBuilder().setNxReg(NxmNxReg0.class);
DstBuilder dstBld = new DstBuilder().setDstChoice(nxRegCaseBld.build()).setStart(0).setEnd(5);
NxRegLoadBuilder nxRegLoadBuilder = new NxRegLoadBuilder();
nxRegLoadBuilder.setDst(dstBld.build());
nxRegLoadBuilder.setValue(BigInteger.valueOf(55L));
NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder topNxActionCaseBld = new NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder();
topNxActionCaseBld.setNxRegLoad(nxRegLoadBuilder.build());
// base part
ActionBuilder abExt = new ActionBuilder();
abExt.setKey(new ActionKey(actionKeyVal));
abExt.setAction(topNxActionCaseBld.build());
return abExt;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCaseBuilder 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();
}
Aggregations