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 ActionConvertorTest method vlanActionData.
private void vlanActionData() {
PushVlanActionBuilder pvB = new PushVlanActionBuilder();
pvB.setVlanId(new VlanId(10));
ActionBuilder actionBuilder1 = new ActionBuilder();
actionBuilder1.setOrder(actionItem).setAction(new PushVlanActionCaseBuilder().setPushVlanAction(pvB.build()).build());
actions.add(actionItem++, actionBuilder1.build());
PopVlanActionBuilder popVAB = new PopVlanActionBuilder();
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setOrder(actionItem).setAction(new PopVlanActionCaseBuilder().setPopVlanAction(popVAB.build()).build());
actions.add(actionItem++, actionBuilder.build());
}
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 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;
}
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 PopVlanActionDeserializer method deserialize.
@Override
public Action deserialize(ByteBuf message) {
processHeader(message);
message.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER);
return new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build();
}
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 PopVlanActionSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final Action action = new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build();
assertAction(action, out -> out.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER));
}
Aggregations