use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction1.
private static InstructionsBuilder createAppyActionInstruction1() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(56);
final Uri value = new Uri("PCEP");
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
final ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
final InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
// Put our Instruction in a list of Instructions
final InstructionsBuilder isb = new InstructionsBuilder();
final List<Instruction> instructions = new ArrayList<>();
ib.setKey(new InstructionKey(0));
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createSentToControllerInstructions.
private static InstructionsBuilder createSentToControllerInstructions() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(Integer.valueOf(0xffff));
final Uri value = new Uri(OutputPortValues.CONTROLLER.toString());
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
final ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
final InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
ib.setOrder(0);
ib.setKey(new InstructionKey(0));
// Put our Instruction in a list of Instructions
final InstructionsBuilder isb = new InstructionsBuilder();
final List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project openflowplugin by opendaylight.
the class AddressNormalizationUtilTest method normalizeProtocolAgnosticPortOF13.
@Test
public void normalizeProtocolAgnosticPortOF13() throws Exception {
final Uri left = new Uri("openflow:1:ANY");
final Uri right = new Uri("ANY");
assertEquals(right, AddressNormalizationUtil.normalizeProtocolAgnosticPort(left, OFConstants.OFP_VERSION_1_3));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project openflowplugin by opendaylight.
the class AddressNormalizationUtilTest method normalizeProtocolAgnosticPortOF10.
@Test
public void normalizeProtocolAgnosticPortOF10() throws Exception {
final Uri left = new Uri("openflow:1:INPORT");
final Uri right = new Uri("IN_PORT");
assertEquals(right, AddressNormalizationUtil.normalizeProtocolAgnosticPort(left, OFConstants.OFP_VERSION_1_0));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createDecNwTtlAction.
private List<Action> createDecNwTtlAction() {
DecNwTtlBuilder nwttl = new DecNwTtlBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(nwttl.build()).build());
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
// output.setMaxLength(30);
Uri value = new Uri("2");
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
ab.setOrder(0);
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
actions.add(action.build());
return actions;
}
Aggregations