Search in sources :

Example 1 with DstOfArpSpaCase

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

the class ActionLoadIpToSpaTest method verifyAction.

private void verifyAction(Action action) {
    assertTrue(action.getAction() instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase);
    NxActionRegLoadNodesNodeTableFlowApplyActionsCase actionCase = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
    assertNotNull(actionCase.getNxRegLoad());
    NxRegLoad nxRegLoad = actionCase.getNxRegLoad();
    assertTrue(nxRegLoad.getDst().getDstChoice() instanceof DstOfArpSpaCase);
    DstOfArpSpaCase dstOfArpSpaCase = (DstOfArpSpaCase) nxRegLoad.getDst().getDstChoice();
    assertTrue(dstOfArpSpaCase.isOfArpSpa());
    assertEquals(0, nxRegLoad.getDst().getStart().intValue());
    assertEquals(31, nxRegLoad.getDst().getEnd().intValue());
    assertEquals(BigInteger.valueOf(InetAddresses.coerceToInteger(InetAddresses.forString(IP_ADDRESS)) & 0xffffffffL), nxRegLoad.getValue());
}
Also used : DstOfArpSpaCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfArpSpaCase) NxActionRegLoadNodesNodeTableFlowApplyActionsCase(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.NxActionRegLoadNodesNodeTableFlowApplyActionsCase) NxRegLoad(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoad)

Aggregations

DstOfArpSpaCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfArpSpaCase)1 NxActionRegLoadNodesNodeTableFlowApplyActionsCase (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.NxActionRegLoadNodesNodeTableFlowApplyActionsCase)1 NxRegLoad (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoad)1