use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder in project openflowplugin by opendaylight.
the class OutputActionSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final int length = 10;
final String port = OutputPortValues.LOCAL.toString();
final Action action = new OutputActionCaseBuilder().setOutputAction(new OutputActionBuilder().setOutputNodeConnector(new Uri("openflow:1:" + port)).setMaxLength(length).build()).build();
assertAction(action, out -> {
assertEquals(out.readUnsignedInt(), BinContent.intToUnsignedLong(PortNumberValues.LOCAL.getIntValue()));
assertEquals(out.readUnsignedShort(), length);
out.skipBytes(ActionConstants.OUTPUT_PADDING);
});
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createAllOutputAction.
private List<Action> createAllOutputAction() {
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(30);
Uri value = new Uri(OutputPortValues.ALL.toString());
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createNormalOutputAction.
private List<Action> createNormalOutputAction() {
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(30);
Uri value = new Uri(OutputPortValues.NORMAL.toString());
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createLocalOutputAction.
private List<Action> createLocalOutputAction() {
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(30);
Uri value = new Uri(OutputPortValues.LOCAL.toString());
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createControllerAction.
private List<Action> createControllerAction() {
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(30);
Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
return actions;
}
Aggregations