use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.SrcBuilder in project genius by opendaylight.
the class ActionMoveSourceDestinationEth method buildAction.
@Override
public Action buildAction(int newActionKey) {
ActionBuilder ab = new ActionBuilder();
NxRegMove regMove = new NxRegMoveBuilder().setSrc(new SrcBuilder().setSrcChoice(new SrcOfEthSrcCaseBuilder().setOfEthSrc(Boolean.TRUE).build()).setStart(0).build()).setDst(new DstBuilder().setDstChoice(new DstOfEthDstCaseBuilder().setOfEthDst(Boolean.TRUE).build()).setStart(0).setEnd(47).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.SrcBuilder in project openflowplugin by opendaylight.
the class OutputRegConvertor method convert.
@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action convert(final Action input, final ActionPath path) {
NxActionOutputReg action = ((ActionOutputReg) input.getActionChoice()).getNxActionOutputReg();
SrcBuilder srcBuilder = new SrcBuilder();
srcBuilder.setSrcChoice(RegMoveConvertor.resolveSrcValue(action.getSrc()));
srcBuilder.setOfsNbits(action.getNBits());
NxOutputRegBuilder builder = new NxOutputRegBuilder();
builder.setSrc(srcBuilder.build());
builder.setMaxLen(action.getMaxLen());
return resolveAction(builder.build(), path);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.SrcBuilder in project openflowplugin by opendaylight.
the class RegMoveConvertor method convert.
@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action convert(Action input, ActionPath path) {
NxActionRegMove actionRegMove = ((ActionRegMove) input.getActionChoice()).getNxActionRegMove();
DstBuilder dstBuilder = new DstBuilder();
dstBuilder.setDstChoice(resolveDstValue(actionRegMove.getDst()));
dstBuilder.setStart(actionRegMove.getDstOfs());
dstBuilder.setEnd(actionRegMove.getDstOfs() + actionRegMove.getNBits() - 1);
SrcBuilder srcBuilder = new SrcBuilder();
srcBuilder.setSrcChoice(resolveSrcValue(actionRegMove.getSrc()));
srcBuilder.setStart(actionRegMove.getSrcOfs());
srcBuilder.setEnd(actionRegMove.getSrcOfs() + actionRegMove.getNBits() - 1);
NxRegMoveBuilder nxRegMoveBuilder = new NxRegMoveBuilder();
nxRegMoveBuilder.setDst(dstBuilder.build());
nxRegMoveBuilder.setSrc(srcBuilder.build());
return resolveAction(nxRegMoveBuilder.build(), path);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.SrcBuilder in project openflowplugin by opendaylight.
the class OxmIpv6SrcSerializerTest method prepareMatchEntry.
private static MatchEntryBuilder prepareMatchEntry(boolean hasMask, String value) {
final MatchEntryBuilder builder = prepareHeader(hasMask);
Ipv6SrcCaseBuilder caseBuilder = new Ipv6SrcCaseBuilder();
Ipv6SrcBuilder srcBuilder = new Ipv6SrcBuilder();
srcBuilder.setIpv6Address(new Ipv6Address(value));
if (hasMask) {
srcBuilder.setMask(new byte[] { 15, 15, 0, 0 });
}
caseBuilder.setIpv6Src(srcBuilder.build());
builder.setMatchEntryValue(caseBuilder.build());
return builder;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.nx.reg.move.SrcBuilder 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();
}
Aggregations