use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxRegCase in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionMoveTunReg.
private void checkActionMoveTunReg(Action action, Class<? extends NxmNxReg> reg, boolean checkSrc) {
NxActionRegMoveNodesNodeTableFlowApplyActionsCase regMove = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
if (checkSrc) {
SrcNxRegCase src = (SrcNxRegCase) regMove.getNxRegMove().getSrc().getSrcChoice();
assertTrue(src.getNxReg() == reg);
} else {
DstNxRegCase dst = (DstNxRegCase) regMove.getNxRegMove().getDst().getDstChoice();
assertTrue(dst.getNxReg() == reg);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxRegCase in project genius by opendaylight.
the class ActionRegLoadTest method actionInfoTestForRegLoadAction.
@Test
public void actionInfoTestForRegLoadAction() {
ActionInfo actionInfo = new ActionRegLoad(1, NxmNxReg6.class, 0, 31, 100);
Action action = actionInfo.buildAction();
assertTrue(action.getAction() instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase);
NxActionRegLoadNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
NxRegLoad nxRegLoad = actionsCase.getNxRegLoad();
assertTrue(nxRegLoad.getDst().getDstChoice() instanceof DstNxRegCase);
DstNxRegCase dstNxRegCase = (DstNxRegCase) nxRegLoad.getDst().getDstChoice();
assertEquals(NxmNxReg6.class, dstNxRegCase.getNxReg());
assertEquals((Integer) 0, nxRegLoad.getDst().getStart());
assertEquals((Integer) 31, nxRegLoad.getDst().getEnd());
assertEquals(100, nxRegLoad.getValue().longValue());
}
Aggregations