/** * Creates a set of clear instructions to remove flows from switch * @return Instructions */ protected Instructions createClearFlowsInstructions() { Instruction clearInstruction = new InstructionBuilder().setOrder(0) .setInstruction(new ClearActionsCaseBuilder().setClearActions(new ClearActionsBuilder().build()).build()).build(); Instructions instructions = new InstructionsBuilder().setInstruction(ImmutableList.of(clearInstruction)) .build(); return instructions; }
private ClearActionsCaseImpl(ClearActionsCaseBuilder base) { this._clearActions = base.getClearActions(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCase>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
salInstruction = applyActionsCaseBuilder.build(); } else if (switchInst.getInstructionChoice() instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instruction.grouping.instruction.choice.ClearActionsCase) { ClearActionsCaseBuilder clearActionsCaseBuilder = new ClearActionsCaseBuilder(); salInstruction = clearActionsCaseBuilder.build(); } else if (switchInst.getInstructionChoice() instanceof GotoTableCase) { GotoTableCase gotoTableCase = ((GotoTableCase) switchInst.getInstructionChoice());
.build())); } else if (currInstructionType instanceof ClearActionsCase) { builder.setInstruction((new ClearActionsCaseBuilder() .setClearActions(new ClearActionsBuilder().build()) .build())); } else if (currInstructionType instanceof MeterCase) { builder.setInstruction((new MeterCaseBuilder()