use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction3.
private static InstructionsBuilder createAppyActionInstruction3() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(Integer.valueOf(0x88E7));
ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.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.push.pbb.action._case.PushPbbActionBuilder in project openflowplugin by opendaylight.
the class OF13PushPbbActionDeserializer method deserialize.
@Override
public Action deserialize(ByteBuf input) {
final ActionBuilder builder = new ActionBuilder();
input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
PushPbbCaseBuilder caseBuilder = new PushPbbCaseBuilder();
PushPbbActionBuilder pbbBuilder = new PushPbbActionBuilder();
pbbBuilder.setEthertype(new EtherType(input.readUnsignedShort()));
caseBuilder.setPushPbbAction(pbbBuilder.build());
builder.setActionChoice(caseBuilder.build());
input.skipBytes(ActionConstants.ETHERTYPE_ACTION_PADDING);
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder 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.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createPushPbbAction.
private List<Action> createPushPbbAction() {
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E7);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
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.push.pbb.action._case.PushPbbActionBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createPushPbbAction.
private List<Action> createPushPbbAction() {
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E7);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
Aggregations