Search in sources :

Example 1 with NxActionResubmit

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit in project openflowplugin by opendaylight.

the class ResubmitConvertor method convert.

@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action convert(final Action input, final ActionPath path) {
    NxActionResubmit action = ((ActionResubmit) input.getActionChoice()).getNxActionResubmit();
    NxResubmitBuilder builder = new NxResubmitBuilder();
    builder.setInPort(action.getInPort());
    builder.setTable(action.getTable());
    return resolveAction(builder.build(), path);
}
Also used : NxActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit) ActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit) NxResubmitBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.resubmit.grouping.NxResubmitBuilder) NxActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit)

Example 2 with NxActionResubmit

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit in project openflowplugin by opendaylight.

the class ResubmitConvertorTest method setUp.

@Before
public void setUp() throws Exception {
    final NxResubmit nxResubmit = Mockito.mock(NxResubmit.class);
    when(actionsCase.getNxResubmit()).thenReturn(nxResubmit);
    when(nxResubmit.getInPort()).thenReturn(1);
    when(nxResubmit.getTable()).thenReturn((short) 2);
    final ActionResubmit actionResubmit = Mockito.mock(ActionResubmit.class);
    final NxActionResubmit nxActionResubmit = Mockito.mock(NxActionResubmit.class);
    when(nxActionResubmit.getInPort()).thenReturn(3);
    when(nxActionResubmit.getTable()).thenReturn((short) 4);
    when(actionResubmit.getNxActionResubmit()).thenReturn(nxActionResubmit);
    when(action.getActionChoice()).thenReturn(actionResubmit);
    resubmitConvertor = new ResubmitConvertor();
}
Also used : NxResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.resubmit.grouping.NxResubmit) NxActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit) ActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit) NxActionResubmit(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit) Before(org.junit.Before)

Aggregations

ActionResubmit (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit)2 NxActionResubmit (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.resubmit.grouping.NxActionResubmit)2 Before (org.junit.Before)1 NxResubmit (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.resubmit.grouping.NxResubmit)1 NxResubmitBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.resubmit.grouping.NxResubmitBuilder)1