use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkTransactionProvider method createAppyActionInstruction16.
private static InstructionsBuilder createAppyActionInstruction16() {
ActionBuilder ab = new ActionBuilder();
GroupActionBuilder groupActionB = new GroupActionBuilder();
groupActionB.setGroupId(1L);
groupActionB.setGroup("0");
ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
List<Action> actionList = new ArrayList<>();
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.action.types.rev131112.action.action.GroupActionCaseBuilder in project openflowplugin by opendaylight.
the class Activator method createGroupInstructions.
private static InstructionsBuilder createGroupInstructions(long groupId) {
ActionBuilder actionBuilder = new ActionBuilder();
GroupActionBuilder groupActionBuilder = new GroupActionBuilder();
groupActionBuilder.setGroupId(groupId);
actionBuilder.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionBuilder.build()).build());
actionBuilder.setOrder(1);
actionBuilder.setKey(new ActionKey(0));
List<Action> actionList = new ArrayList<>();
actionList.add(actionBuilder.build());
ApplyActionsBuilder applyActionsBuilder = new ApplyActionsBuilder();
applyActionsBuilder.setAction(actionList);
InstructionBuilder instructionBuilder = new InstructionBuilder();
instructionBuilder.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(applyActionsBuilder.build()).build());
instructionBuilder.setOrder(0);
instructionBuilder.setKey(new InstructionKey(0));
InstructionsBuilder instructionsBuilder = new InstructionsBuilder();
List<Instruction> instructions = new ArrayList<>();
instructions.add(instructionBuilder.build());
instructionsBuilder.setInstruction(instructions);
return instructionsBuilder;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder in project openflowplugin by opendaylight.
the class GroupConvertorTest method assembleActionBuilder.
private static ActionBuilder assembleActionBuilder(final String groupName, final int actionOrder) {
final GroupActionBuilder groupActionBuilder = new GroupActionBuilder();
groupActionBuilder.setGroup(groupName);
final GroupActionCaseBuilder groupActionCaseBuilder = new GroupActionCaseBuilder();
groupActionCaseBuilder.setGroupAction(groupActionBuilder.build());
final ActionBuilder actionsBld = new ActionBuilder();
actionsBld.setOrder(actionOrder).setAction(groupActionCaseBuilder.build());
return actionsBld;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction16.
private static InstructionsBuilder createAppyActionInstruction16() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final GroupActionBuilder groupActionB = new GroupActionBuilder();
groupActionB.setGroupId(1L);
groupActionB.setGroup("0");
ab.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.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.action.types.rev131112.action.action.GroupActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createGroupAction.
private List<Action> createGroupAction() {
GroupActionBuilder groupActionB = new GroupActionBuilder();
groupActionB.setGroupId(1L);
groupActionB.setGroup("0");
ActionBuilder action = new ActionBuilder();
action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
action.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
Aggregations