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);
}
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();
}
Aggregations