Search in sources :

Example 1 with DstNxNspCase

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

the class OpenFlow13ProviderTest method checkActionLoadNsp.

private void checkActionLoadNsp(Action action) {
    NxActionRegLoadNodesNodeTableFlowApplyActionsCase regLoad = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
    DstNxNspCase nspCase = (DstNxNspCase) regLoad.getNxRegLoad().getDst().getDstChoice();
    assertTrue(nspCase.isNxNspDst());
}
Also used : 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) DstNxNspCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxNspCase)

Example 2 with DstNxNspCase

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

the class MultipathConvertorTest method setUp.

@Before
public void setUp() throws Exception {
    final NxMultipath nxMultipath = Mockito.mock(NxMultipath.class);
    when(bucketActionsCase.getNxMultipath()).thenReturn(nxMultipath);
    final Dst dst = Mockito.mock(Dst.class);
    when(dst.getStart()).thenReturn(1);
    when(dst.getEnd()).thenReturn(2);
    final DstNxNspCase dstNxNspCase = Mockito.mock(DstNxNspCase.class);
    when(dst.getDstChoice()).thenReturn(dstNxNspCase);
    when(nxMultipath.getFields()).thenReturn(OfjNxHashFields.NXHASHFIELDSETHSRC);
    when(nxMultipath.getBasis()).thenReturn(2);
    when(nxMultipath.getAlgorithm()).thenReturn(OfjNxMpAlgorithm.NXMPALGHASHTHRESHOLD);
    when(nxMultipath.getMaxLink()).thenReturn(2);
    when(nxMultipath.getArg()).thenReturn(2L);
    when(nxMultipath.getDst()).thenReturn(dst);
    final ActionMultipath actionMultipath = Mockito.mock(ActionMultipath.class);
    final NxActionMultipath nxActionMultipath = Mockito.mock(NxActionMultipath.class);
    when(nxActionMultipath.getDst()).thenReturn(NiciraMatchCodecs.TUN_ID_CODEC.getHeaderWithoutHasMask().toLong());
    when(nxActionMultipath.getBasis()).thenReturn(1);
    when(nxActionMultipath.getAlgorithm()).thenReturn(OfjNxMpAlgorithm.NXMPALGHRW);
    when(nxActionMultipath.getMaxLink()).thenReturn(2);
    when(nxActionMultipath.getArg()).thenReturn(2L);
    when(actionMultipath.getNxActionMultipath()).thenReturn(nxActionMultipath);
    when(action.getActionChoice()).thenReturn(actionMultipath);
    multipathConvertor = new MultipathConvertor();
}
Also used : NxActionMultipath(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.multipath.grouping.NxActionMultipath) Dst(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.multipath.grouping.nx.multipath.Dst) NxActionMultipath(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.multipath.grouping.NxActionMultipath) ActionMultipath(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionMultipath) DstNxNspCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxNspCase) NxMultipath(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.multipath.grouping.NxMultipath) Before(org.junit.Before)

Aggregations

DstNxNspCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxNspCase)2 Before (org.junit.Before)1 ActionMultipath (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionMultipath)1 NxActionMultipath (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.multipath.grouping.NxActionMultipath)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 NxMultipath (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.multipath.grouping.NxMultipath)1 Dst (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.multipath.grouping.nx.multipath.Dst)1