use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.mpls.ttl._case.DecMplsTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction11.
private static InstructionsBuilder createAppyActionInstruction11() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final DecMplsTtlBuilder mpls = new DecMplsTtlBuilder();
ab.setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(mpls.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());
ib.setKey(new InstructionKey(0));
ib.setOrder(0);
// Put our Instruction in a list of Instruction
final InstructionsBuilder isb = new InstructionsBuilder();
final 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.dec.mpls.ttl._case.DecMplsTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createDecMplsTtlAction.
private List<Action> createDecMplsTtlAction() {
DecMplsTtlBuilder mpls = new DecMplsTtlBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(mpls.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.dec.mpls.ttl._case.DecMplsTtlBuilder in project openflowplugin by opendaylight.
the class DecMplsTtlActionDeserializer method deserialize.
@Override
public Action deserialize(ByteBuf message) {
processHeader(message);
message.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER);
return new DecMplsTtlCaseBuilder().setDecMplsTtl(new DecMplsTtlBuilder().build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.mpls.ttl._case.DecMplsTtlBuilder in project openflowplugin by opendaylight.
the class DecMplsTtlActionSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final Action action = new DecMplsTtlCaseBuilder().setDecMplsTtl(new DecMplsTtlBuilder().build()).build();
assertAction(action, out -> out.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.mpls.ttl._case.DecMplsTtlBuilder in project openflowplugin by opendaylight.
the class ActionConvertorTest method mplsTtlActionData.
private void mplsTtlActionData() {
SetMplsTtlActionBuilder setMplsTtlActionB = new SetMplsTtlActionBuilder();
setMplsTtlActionB.setMplsTtl((short) 10);
ActionBuilder actionBuilder1 = new ActionBuilder();
actionBuilder1.setOrder(actionItem).setAction(new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(setMplsTtlActionB.build()).build());
actions.add(actionItem++, actionBuilder1.build());
DecMplsTtlBuilder decMplsTtlB = new DecMplsTtlBuilder();
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setOrder(actionItem).setAction(new DecMplsTtlCaseBuilder().setDecMplsTtl(decMplsTtlB.build()).build());
actions.add(actionItem++, actionBuilder.build());
}
Aggregations