Search in sources :

Example 1 with DstOfIpDstCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpDstCase in project genius by opendaylight.

the class ActionMoveSourceDestinationIpTest method verifyAction.

private void verifyAction(Action action) {
    assertTrue(action.getAction() instanceof NxActionRegMoveNodesNodeTableFlowApplyActionsCase);
    NxActionRegMoveNodesNodeTableFlowApplyActionsCase actionCase = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
    NxRegMove nxRegMove = actionCase.getNxRegMove();
    assertTrue(nxRegMove.getSrc().getSrcChoice() instanceof SrcOfIpSrcCase);
    SrcOfIpSrcCase srcChoice = (SrcOfIpSrcCase) nxRegMove.getSrc().getSrcChoice();
    assertTrue(srcChoice.isOfIpSrc());
    assertEquals(0, nxRegMove.getSrc().getStart().intValue());
    assertTrue(nxRegMove.getDst().getDstChoice() instanceof DstOfIpDstCase);
    DstOfIpDstCase dstChoice = (DstOfIpDstCase) nxRegMove.getDst().getDstChoice();
    assertTrue(dstChoice.isOfIpDst());
    assertEquals(0, nxRegMove.getDst().getStart().intValue());
    assertEquals(31, nxRegMove.getDst().getEnd().intValue());
}
Also used : SrcOfIpSrcCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpSrcCase) NxRegMove(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.NxRegMove) DstOfIpDstCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpDstCase) 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)

Aggregations

DstOfIpDstCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpDstCase)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 SrcOfIpSrcCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpSrcCase)1