use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder in project openflowplugin by opendaylight.
the class AbstractDropTest method makeStaticDropActionInstructions.
private static Instructions makeStaticDropActionInstructions() {
// Create an DropAction
final DropActionCase dropAction = new DropActionCaseBuilder().setDropAction(new DropActionBuilder().build()).build();
// Create an Action
final Action ab = new ActionBuilder().setOrder(0).setAction(dropAction).build();
// Create an Apply Action
final ApplyActions aab = new ApplyActionsBuilder().setAction(Collections.singletonList(ab)).build();
// Wrap our Apply Action in an Instruction
final Instruction ib = new InstructionBuilder().setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab).build()).setOrder(0).build();
// Put our Instruction in a list of Instructions
return new InstructionsBuilder().setInstruction(Collections.singletonList(ib)).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createAppyActionInstruction3.
private static InstructionsBuilder createAppyActionInstruction3() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E7);
ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
// Put our Instruction in a list of Instructions
InstructionsBuilder isb = new InstructionsBuilder();
List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createAppyActionInstruction7.
private static InstructionsBuilder createAppyActionInstruction7() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetVlanIdActionBuilder vl = new SetVlanIdActionBuilder();
VlanId vlanId = new VlanId(4012);
vl.setVlanId(vlanId);
ab.setAction(new SetVlanIdActionCaseBuilder().setSetVlanIdAction(vl.build()).build());
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
// Put our Instruction in a list of Instructions
InstructionsBuilder isb = new InstructionsBuilder();
List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createAppyActionInstruction.
private static InstructionsBuilder createAppyActionInstruction() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
ControllerActionBuilder controller = new ControllerActionBuilder();
controller.setMaxLength(5);
ab.setAction(new ControllerActionCaseBuilder().setControllerAction(controller.build()).build());
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
// Put our Instruction in a list of Instructions
InstructionsBuilder isb = new InstructionsBuilder();
List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createAppyActionInstruction21.
private static InstructionsBuilder createAppyActionInstruction21() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
PopVlanActionBuilder popVlanActionBuilder = new PopVlanActionBuilder();
ab.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(popVlanActionBuilder.build()).build());
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
// Put our Instruction in a list of Instructions
InstructionsBuilder isb = new InstructionsBuilder();
List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
isb.setInstruction(instructions);
return isb;
}
Aggregations