use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionRegMove in project openflowplugin by opendaylight.
the class RegMoveConvertorTest method testConvert.
@Test
public void testConvert() throws Exception {
final ActionRegMove actionRegMove = (ActionRegMove) regMoveConvertor.convert(actionsCase).getActionChoice();
Assert.assertEquals(Integer.valueOf(3), actionRegMove.getNxActionRegMove().getDstOfs());
Assert.assertEquals(Integer.valueOf(2), actionRegMove.getNxActionRegMove().getNBits());
Assert.assertEquals(Integer.valueOf(1), actionRegMove.getNxActionRegMove().getSrcOfs());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionRegMove in project genius by opendaylight.
the class ActionRegMoveTest method actionInfoTestForRegMoveToMplsAction.
@Test
public void actionInfoTestForRegMoveToMplsAction() {
ActionInfo actionInfo = new ActionRegMove(1, NxmNxReg1.class, 0, 31);
Action action = actionInfo.buildAction();
assertTrue(action.getAction() instanceof NxActionRegMoveNodesNodeTableFlowApplyActionsCase);
NxActionRegMoveNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
NxRegMove nxRegMove = actionsCase.getNxRegMove();
assertTrue(nxRegMove.getDst().getDstChoice() instanceof DstOfMplsLabelCase);
assertEquals((Integer) 0, nxRegMove.getDst().getStart());
assertEquals((Integer) 31, nxRegMove.getDst().getEnd());
}
Aggregations