use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder in project openflowplugin by opendaylight.
the class Activator method createBuckets.
private static BucketsBuilder createBuckets() {
List<Action> actionList = new ArrayList<>();
actionList.add(new ActionBuilder().setOrder(0).setAction(new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build()).build());
BucketBuilder bucketBuilder = new BucketBuilder();
bucketBuilder.setBucketId(new BucketId(12L));
bucketBuilder.setAction(actionList);
List<Bucket> bucketList = new ArrayList<>();
bucketList.add(bucketBuilder.build());
actionList = new ArrayList<>();
SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
setFieldCaseBuilder.setSetField(new SetFieldBuilder().setLayer3Match(new Ipv4MatchBuilder().setIpv4Source(new Ipv4Prefix("10.0.1.0/32")).build()).build());
actionList.add(new ActionBuilder().setAction(setFieldCaseBuilder.build()).setOrder(0).build());
setFieldCaseBuilder = new SetFieldCaseBuilder();
setFieldCaseBuilder.setSetField(new SetFieldBuilder().setLayer3Match(new Ipv4MatchBuilder().setIpv4Destination(new Ipv4Prefix("10.0.10.0/32")).build()).build());
actionList.add(new ActionBuilder().setAction(setFieldCaseBuilder.build()).setOrder(0).build());
bucketBuilder = new BucketBuilder();
bucketBuilder.setBucketId(new BucketId(13L));
bucketBuilder.setAction(actionList);
bucketList.add(bucketBuilder.build());
BucketsBuilder bucketsBuilder = new BucketsBuilder();
bucketsBuilder.setBucket(bucketList);
return bucketsBuilder;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder in project genius by opendaylight.
the class MDSALUtil method buildAndGetPopVlanActionInstruction.
public static Instruction buildAndGetPopVlanActionInstruction(int actionKey, int instructionKey) {
Action popVlanAction = new ActionBuilder().setAction(new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build()).setKey(new ActionKey(actionKey)).build();
List<Action> listAction = new ArrayList<>();
listAction.add(popVlanAction);
return buildApplyActionsInstruction(listAction, instructionKey);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction21.
private static InstructionsBuilder createAppyActionInstruction21() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final PopVlanActionBuilder popVlanActionBuilder = new PopVlanActionBuilder();
ab.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(popVlanActionBuilder.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.pop.vlan.action._case.PopVlanActionBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createPopVlanAction.
private List<Action> createPopVlanAction() {
PopVlanActionBuilder vlanAction = new PopVlanActionBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build());
action.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createPopVlanAction.
private List<Action> createPopVlanAction() {
PopVlanActionBuilder vlanAction = new PopVlanActionBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build());
action.setKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
Aggregations