use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction28.
private static InstructionsBuilder createAppyActionInstruction28() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final SetNwTosActionBuilder setNwTosActionBuilder = new SetNwTosActionBuilder();
setNwTosActionBuilder.setTos(8);
ab.setAction(new SetNwTosActionCaseBuilder().setSetNwTosAction(setNwTosActionBuilder.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.opendaylight.flow.types.rev131026.flow.InstructionsBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction9.
private static InstructionsBuilder createAppyActionInstruction9() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final CopyTtlInBuilder ttlin = new CopyTtlInBuilder();
ab.setAction(new CopyTtlInCaseBuilder().setCopyTtlIn(ttlin.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.opendaylight.flow.types.rev131026.flow.InstructionsBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction34.
private static InstructionsBuilder createAppyActionInstruction34() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final SwPathActionBuilder swPathAction = new SwPathActionBuilder();
ab.setAction(new SwPathActionCaseBuilder().setSwPathAction(swPathAction.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.opendaylight.flow.types.rev131026.flow.InstructionsBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction25.
private static InstructionsBuilder createAppyActionInstruction25() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final SetNextHopActionBuilder setNextHopActionBuilder = new SetNextHopActionBuilder();
final Ipv4Builder ipnext = new Ipv4Builder();
final Ipv4Prefix prefix = new Ipv4Prefix(IPV4_PREFIX);
ipnext.setIpv4Address(prefix);
setNextHopActionBuilder.setAddress(ipnext.build());
ab.setAction(new SetNextHopActionCaseBuilder().setSetNextHopAction(setNextHopActionBuilder.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.opendaylight.flow.types.rev131026.flow.InstructionsBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction33.
private static InstructionsBuilder createAppyActionInstruction33() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final SetVlanCfiActionBuilder setVlanCfiActionBuilder = new SetVlanCfiActionBuilder();
setVlanCfiActionBuilder.setVlanCfi(new VlanCfi(2));
ab.setAction(new SetVlanCfiActionCaseBuilder().setSetVlanCfiAction(setVlanCfiActionBuilder.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;
}
Aggregations