Search in sources :

Example 1 with DstOfMplsLabelCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfMplsLabelCase 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());
}
Also used : Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action) NxRegMove(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.NxRegMove) DstOfMplsLabelCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfMplsLabelCase) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) NxActionRegMoveNodesNodeTableFlowApplyActionsCase(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.NxActionRegMoveNodesNodeTableFlowApplyActionsCase) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ActionInfo (org.opendaylight.genius.mdsalutil.ActionInfo)1 Action (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action)1 DstOfMplsLabelCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfMplsLabelCase)1 NxActionRegMoveNodesNodeTableFlowApplyActionsCase (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.NxActionRegMoveNodesNodeTableFlowApplyActionsCase)1 NxRegMove (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.NxRegMove)1