use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.nw.ttl._case.DecNwTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createDecNwTtlInstructions.
private static InstructionsBuilder createDecNwTtlInstructions() {
DecNwTtlBuilder ta = new DecNwTtlBuilder();
DecNwTtl decNwTtl = ta.build();
ActionBuilder ab = new ActionBuilder();
ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build());
// Add our drop action to a list
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());
ib.setKey(new InstructionKey(0));
ib.setOrder(0);
// 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.dec.nw.ttl._case.DecNwTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createDecNwTtlAction.
private List<Action> createDecNwTtlAction() {
DecNwTtlBuilder nwttl = new DecNwTtlBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(nwttl.build()).build());
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
// output.setMaxLength(30);
Uri value = new Uri("2");
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setKey(new ActionKey(0));
ab.setOrder(0);
List<Action> actions = new ArrayList<>();
actions.add(ab.build());
actions.add(action.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.nw.ttl._case.DecNwTtlBuilder in project openflowplugin by opendaylight.
the class ActionConvertorTest method nwTtlAction.
private void nwTtlAction() {
SetNwTtlActionBuilder setNwTtlActionBuilder = new SetNwTtlActionBuilder();
setNwTtlActionBuilder.setNwTtl((short) 1);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setOrder(actionItem).setAction(new SetNwTtlActionCaseBuilder().setSetNwTtlAction(setNwTtlActionBuilder.build()).build());
actions.add(actionItem++, actionBuilder.build());
DecNwTtlBuilder necNwTtlBuilder = new DecNwTtlBuilder();
ActionBuilder actionBuilder1 = new ActionBuilder();
actionBuilder1.setOrder(actionItem).setAction(new DecNwTtlCaseBuilder().setDecNwTtl(necNwTtlBuilder.build()).build());
actions.add(actionItem++, actionBuilder1.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.dec.nw.ttl._case.DecNwTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createAppyActionInstruction12.
private static InstructionsBuilder createAppyActionInstruction12() {
final List<Action> actionList = new ArrayList<>();
final ActionBuilder ab = new ActionBuilder();
final DecNwTtlBuilder nwttl = new DecNwTtlBuilder();
ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(nwttl.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.dec.nw.ttl._case.DecNwTtlBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginTestCommandProvider method createDecNwTtlInstructions.
private static InstructionsBuilder createDecNwTtlInstructions() {
final DecNwTtlBuilder ta = new DecNwTtlBuilder();
final DecNwTtl decNwTtl = ta.build();
final ActionBuilder ab = new ActionBuilder();
ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build());
ab.setKey(new ActionKey(0));
// Add our drop action to a list
final List<Action> actionList = new ArrayList<>();
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 Instructions
final InstructionsBuilder isb = new InstructionsBuilder();
final List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
ib.setKey(new InstructionKey(0));
isb.setInstruction(instructions);
return isb;
}
Aggregations