Committed by
Gerrit Code Review
Remove Instruction.DROP deprecated in Emu
Change-Id: Ida5a5f489815dd1e972f6bfc8646e1e1bf0e8edd
Showing
11 changed files
with
1 additions
and
28 deletions
... | @@ -275,9 +275,7 @@ public class GetFlowStatistics extends AbstractShellCommand { | ... | @@ -275,9 +275,7 @@ public class GetFlowStatistics extends AbstractShellCommand { |
275 | private Instruction.Type getInstructionType(String instType) { | 275 | private Instruction.Type getInstructionType(String instType) { |
276 | String instTypeUC = instType.toUpperCase(); | 276 | String instTypeUC = instType.toUpperCase(); |
277 | 277 | ||
278 | - if (instTypeUC.equals("DROP")) { | 278 | + if (instTypeUC.equals("OUTPUT")) { |
279 | - return Instruction.Type.DROP; | ||
280 | - } else if (instTypeUC.equals("OUTPUT")) { | ||
281 | return Instruction.Type.OUTPUT; | 279 | return Instruction.Type.OUTPUT; |
282 | } else if (instTypeUC.equals("GROUP")) { | 280 | } else if (instTypeUC.equals("GROUP")) { |
283 | return Instruction.Type.GROUP; | 281 | return Instruction.Type.GROUP; | ... | ... |
... | @@ -235,7 +235,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { | ... | @@ -235,7 +235,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { |
235 | public Builder add(Instruction instruction) { | 235 | public Builder add(Instruction instruction) { |
236 | 236 | ||
237 | switch (instruction.type()) { | 237 | switch (instruction.type()) { |
238 | - case DROP: | ||
239 | case NOACTION: | 238 | case NOACTION: |
240 | case OUTPUT: | 239 | case OUTPUT: |
241 | case GROUP: | 240 | case GROUP: | ... | ... |
... | @@ -25,13 +25,6 @@ public interface Instruction { | ... | @@ -25,13 +25,6 @@ public interface Instruction { |
25 | */ | 25 | */ |
26 | enum Type { | 26 | enum Type { |
27 | /** | 27 | /** |
28 | - * Signifies that the traffic should be dropped. | ||
29 | - * @deprecated 1.4.0 Emu Release | ||
30 | - */ | ||
31 | - @Deprecated | ||
32 | - DROP, | ||
33 | - | ||
34 | - /** | ||
35 | * Signifies that the traffic requires no action. | 28 | * Signifies that the traffic requires no action. |
36 | * | 29 | * |
37 | * In OF10, the behavior of NOACTION is DROP. | 30 | * In OF10, the behavior of NOACTION is DROP. | ... | ... |
... | @@ -251,7 +251,6 @@ public final class EncodeInstructionCodecHelper { | ... | @@ -251,7 +251,6 @@ public final class EncodeInstructionCodecHelper { |
251 | result.put(InstructionCodec.PORT, outputInstruction.port().toString()); | 251 | result.put(InstructionCodec.PORT, outputInstruction.port().toString()); |
252 | break; | 252 | break; |
253 | 253 | ||
254 | - case DROP: | ||
255 | case NOACTION: | 254 | case NOACTION: |
256 | break; | 255 | break; |
257 | 256 | ... | ... |
... | @@ -168,9 +168,6 @@ public class SimpleStatisticStore implements StatisticStore { | ... | @@ -168,9 +168,6 @@ public class SimpleStatisticStore implements StatisticStore { |
168 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; | 168 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; |
169 | return out.port(); | 169 | return out.port(); |
170 | } | 170 | } |
171 | - if (i.type() == Instruction.Type.DROP) { | ||
172 | - return PortNumber.P0; | ||
173 | - } | ||
174 | } | 171 | } |
175 | return null; | 172 | return null; |
176 | } | 173 | } | ... | ... |
... | @@ -170,8 +170,6 @@ public final class FlowObjectiveCompositionUtil { | ... | @@ -170,8 +170,6 @@ public final class FlowObjectiveCompositionUtil { |
170 | 170 | ||
171 | for (Instruction instruction : trafficTreatment.allInstructions()) { | 171 | for (Instruction instruction : trafficTreatment.allInstructions()) { |
172 | switch (instruction.type()) { | 172 | switch (instruction.type()) { |
173 | - case DROP: | ||
174 | - return null; | ||
175 | case OUTPUT: | 173 | case OUTPUT: |
176 | break; | 174 | break; |
177 | case GROUP: | 175 | case GROUP: | ... | ... |
... | @@ -326,9 +326,6 @@ public class DistributedFlowStatisticStore implements FlowStatisticStore { | ... | @@ -326,9 +326,6 @@ public class DistributedFlowStatisticStore implements FlowStatisticStore { |
326 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; | 326 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; |
327 | return out.port(); | 327 | return out.port(); |
328 | } | 328 | } |
329 | - if (i.type() == Instruction.Type.DROP) { | ||
330 | - return PortNumber.P0; | ||
331 | - } | ||
332 | } | 329 | } |
333 | return null; | 330 | return null; |
334 | } | 331 | } | ... | ... |
... | @@ -312,9 +312,6 @@ public class DistributedStatisticStore implements StatisticStore { | ... | @@ -312,9 +312,6 @@ public class DistributedStatisticStore implements StatisticStore { |
312 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; | 312 | Instructions.OutputInstruction out = (Instructions.OutputInstruction) i; |
313 | return out.port(); | 313 | return out.port(); |
314 | } | 314 | } |
315 | - if (i.type() == Instruction.Type.DROP) { | ||
316 | - return PortNumber.P0; | ||
317 | - } | ||
318 | } | 315 | } |
319 | return null; | 316 | return null; |
320 | } | 317 | } | ... | ... |
providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
... | @@ -146,7 +146,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -146,7 +146,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
146 | } | 146 | } |
147 | for (Instruction i : treatment.immediate()) { | 147 | for (Instruction i : treatment.immediate()) { |
148 | switch (i.type()) { | 148 | switch (i.type()) { |
149 | - case DROP: | ||
150 | case NOACTION: | 149 | case NOACTION: |
151 | return Collections.emptyList(); | 150 | return Collections.emptyList(); |
152 | case L2MODIFICATION: | 151 | case L2MODIFICATION: | ... | ... |
providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
... | @@ -232,7 +232,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -232,7 +232,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
232 | List<OFAction> actions = new LinkedList<>(); | 232 | List<OFAction> actions = new LinkedList<>(); |
233 | for (Instruction i : treatments) { | 233 | for (Instruction i : treatments) { |
234 | switch (i.type()) { | 234 | switch (i.type()) { |
235 | - case DROP: | ||
236 | case NOACTION: | 235 | case NOACTION: |
237 | return Collections.emptyList(); | 236 | return Collections.emptyList(); |
238 | case L0MODIFICATION: | 237 | case L0MODIFICATION: | ... | ... |
... | @@ -235,9 +235,6 @@ public final class GroupModBuilder { | ... | @@ -235,9 +235,6 @@ public final class GroupModBuilder { |
235 | List<OFAction> actions = new LinkedList<>(); | 235 | List<OFAction> actions = new LinkedList<>(); |
236 | for (Instruction i : treatment.allInstructions()) { | 236 | for (Instruction i : treatment.allInstructions()) { |
237 | switch (i.type()) { | 237 | switch (i.type()) { |
238 | - case DROP: | ||
239 | - log.warn("Saw drop action; assigning drop action"); | ||
240 | - return Collections.emptyList(); | ||
241 | case L0MODIFICATION: | 238 | case L0MODIFICATION: |
242 | actions.add(buildL0Modification(i)); | 239 | actions.add(buildL0Modification(i)); |
243 | break; | 240 | break; | ... | ... |
-
Please register or login to post a comment