Ray Milkey
Committed by Gerrit Code Review

Remove methods deprecated in Drake from TrafficTreatment API

Change-Id: I9de9331611c79ae60195c738ee1d3912f4081e3d
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
15 */ 15 */
16 package org.onosproject.net.flow; 16 package org.onosproject.net.flow;
17 17
18 -import static com.google.common.base.Preconditions.checkNotNull;
19 -
20 import java.util.List; 18 import java.util.List;
21 import java.util.Objects; 19 import java.util.Objects;
22 20
...@@ -28,7 +26,6 @@ import org.onlab.packet.TpPort; ...@@ -28,7 +26,6 @@ import org.onlab.packet.TpPort;
28 import org.onlab.packet.VlanId; 26 import org.onlab.packet.VlanId;
29 import org.onosproject.core.GroupId; 27 import org.onosproject.core.GroupId;
30 import org.onosproject.net.DeviceId; 28 import org.onosproject.net.DeviceId;
31 -import org.onosproject.net.IndexedLambda;
32 import org.onosproject.net.PortNumber; 29 import org.onosproject.net.PortNumber;
33 import org.onosproject.net.flow.instructions.ExtensionTreatment; 30 import org.onosproject.net.flow.instructions.ExtensionTreatment;
34 import org.onosproject.net.flow.instructions.Instruction; 31 import org.onosproject.net.flow.instructions.Instruction;
...@@ -39,6 +36,8 @@ import com.google.common.base.MoreObjects; ...@@ -39,6 +36,8 @@ import com.google.common.base.MoreObjects;
39 import com.google.common.collect.ImmutableList; 36 import com.google.common.collect.ImmutableList;
40 import com.google.common.collect.Lists; 37 import com.google.common.collect.Lists;
41 38
39 +import static com.google.common.base.Preconditions.checkNotNull;
40 +
42 /** 41 /**
43 * Default traffic treatment implementation. 42 * Default traffic treatment implementation.
44 */ 43 */
...@@ -351,11 +350,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -351,11 +350,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
351 } 350 }
352 351
353 @Override 352 @Override
354 - public Builder popMpls(int etherType) {
355 - return add(Instructions.popMpls(new EthType(etherType)));
356 - }
357 -
358 - @Override
359 public Builder popMpls(EthType etherType) { 353 public Builder popMpls(EthType etherType) {
360 return add(Instructions.popMpls(etherType)); 354 return add(Instructions.popMpls(etherType));
361 } 355 }
...@@ -375,14 +369,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -375,14 +369,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
375 return add(Instructions.decMplsTtl()); 369 return add(Instructions.decMplsTtl());
376 } 370 }
377 371
378 - @Deprecated
379 - @Override
380 - /**
381 - * @deprecated 1.3.0 Drake Release
382 - */
383 - public Builder setLambda(short lambda) {
384 - return add(Instructions.modL0Lambda(new IndexedLambda(lambda)));
385 - }
386 372
387 @Override 373 @Override
388 public Builder group(GroupId groupId) { 374 public Builder group(GroupId groupId) {
...@@ -447,57 +433,21 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -447,57 +433,21 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
447 return add(Instructions.modTunnelId(tunnelId)); 433 return add(Instructions.modTunnelId(tunnelId));
448 } 434 }
449 435
450 - @Deprecated
451 - @Override
452 - /**
453 - * @deprecated 1.3.0 Drake Release
454 - */
455 - public TrafficTreatment.Builder setTcpSrc(short port) {
456 - return setTcpSrc(TpPort.tpPort(port));
457 - }
458 -
459 @Override 436 @Override
460 public TrafficTreatment.Builder setTcpSrc(TpPort port) { 437 public TrafficTreatment.Builder setTcpSrc(TpPort port) {
461 return add(Instructions.modTcpSrc(port)); 438 return add(Instructions.modTcpSrc(port));
462 } 439 }
463 440
464 - @Deprecated
465 - @Override
466 - /**
467 - * @deprecated 1.3.0 Drake Release
468 - */
469 - public TrafficTreatment.Builder setTcpDst(short port) {
470 - return setTcpDst(TpPort.tpPort(port));
471 - }
472 -
473 @Override 441 @Override
474 public TrafficTreatment.Builder setTcpDst(TpPort port) { 442 public TrafficTreatment.Builder setTcpDst(TpPort port) {
475 return add(Instructions.modTcpDst(port)); 443 return add(Instructions.modTcpDst(port));
476 } 444 }
477 445
478 - @Deprecated
479 - @Override
480 - /**
481 - * @deprecated 1.3.0 Drake Release
482 - */
483 - public TrafficTreatment.Builder setUdpSrc(short port) {
484 - return setUdpSrc(TpPort.tpPort(port));
485 - }
486 -
487 @Override 446 @Override
488 public TrafficTreatment.Builder setUdpSrc(TpPort port) { 447 public TrafficTreatment.Builder setUdpSrc(TpPort port) {
489 return add(Instructions.modUdpSrc(port)); 448 return add(Instructions.modUdpSrc(port));
490 } 449 }
491 450
492 - @Deprecated
493 - @Override
494 - /**
495 - * @deprecated 1.3.0 Drake Release
496 - */
497 - public TrafficTreatment.Builder setUdpDst(short port) {
498 - return setUdpDst(TpPort.tpPort(port));
499 - }
500 -
501 @Override 451 @Override
502 public TrafficTreatment.Builder setUdpDst(TpPort port) { 452 public TrafficTreatment.Builder setUdpDst(TpPort port) {
503 return add(Instructions.modUdpDst(port)); 453 return add(Instructions.modUdpDst(port));
......
...@@ -208,16 +208,6 @@ public interface TrafficTreatment { ...@@ -208,16 +208,6 @@ public interface TrafficTreatment {
208 * 208 *
209 * @param etherType an ether type 209 * @param etherType an ether type
210 * @return a treatment builder 210 * @return a treatment builder
211 - * @deprecated in Drake Release
212 - */
213 - @Deprecated
214 - Builder popMpls(int etherType);
215 -
216 - /**
217 - * Pops MPLS ether type and set the new ethertype.
218 - *
219 - * @param etherType an ether type
220 - * @return a treatment builder
221 */ 211 */
222 Builder popMpls(EthType etherType); 212 Builder popMpls(EthType etherType);
223 213
...@@ -245,16 +235,6 @@ public interface TrafficTreatment { ...@@ -245,16 +235,6 @@ public interface TrafficTreatment {
245 Builder decMplsTtl(); 235 Builder decMplsTtl();
246 236
247 /** 237 /**
248 - * Sets the optical channel ID or lambda.
249 - *
250 - * @param lambda optical channel ID
251 - * @return a treatment builder
252 - * @deprecated in Drake Release
253 - */
254 - @Deprecated
255 - Builder setLambda(short lambda);
256 -
257 - /**
258 * Sets the group ID. 238 * Sets the group ID.
259 * 239 *
260 * @param groupId group ID 240 * @param groupId group ID
...@@ -356,16 +336,6 @@ public interface TrafficTreatment { ...@@ -356,16 +336,6 @@ public interface TrafficTreatment {
356 * 336 *
357 * @param port a port number 337 * @param port a port number
358 * @return a treatment builder 338 * @return a treatment builder
359 - * @deprecated in Drake release
360 - */
361 - @Deprecated
362 - Builder setTcpSrc(short port);
363 -
364 - /**
365 - * Sets the src TCP port.
366 - *
367 - * @param port a port number
368 - * @return a treatment builder
369 */ 339 */
370 Builder setTcpSrc(TpPort port); 340 Builder setTcpSrc(TpPort port);
371 341
...@@ -374,16 +344,6 @@ public interface TrafficTreatment { ...@@ -374,16 +344,6 @@ public interface TrafficTreatment {
374 * 344 *
375 * @param port a port number 345 * @param port a port number
376 * @return a treatment builder 346 * @return a treatment builder
377 - * @deprecated in Drake release
378 - */
379 - @Deprecated
380 - Builder setTcpDst(short port);
381 -
382 - /**
383 - * Sets the dst TCP port.
384 - *
385 - * @param port a port number
386 - * @return a treatment builder
387 */ 347 */
388 Builder setTcpDst(TpPort port); 348 Builder setTcpDst(TpPort port);
389 349
...@@ -392,16 +352,6 @@ public interface TrafficTreatment { ...@@ -392,16 +352,6 @@ public interface TrafficTreatment {
392 * 352 *
393 * @param port a port number 353 * @param port a port number
394 * @return a treatment builder 354 * @return a treatment builder
395 - * @deprecated in Drake release
396 - */
397 - @Deprecated
398 - Builder setUdpSrc(short port);
399 -
400 - /**
401 - * Sets the src UDP port.
402 - *
403 - * @param port a port number
404 - * @return a treatment builder
405 */ 355 */
406 Builder setUdpSrc(TpPort port); 356 Builder setUdpSrc(TpPort port);
407 357
...@@ -410,16 +360,6 @@ public interface TrafficTreatment { ...@@ -410,16 +360,6 @@ public interface TrafficTreatment {
410 * 360 *
411 * @param port a port number 361 * @param port a port number
412 * @return a treatment builder 362 * @return a treatment builder
413 - * @deprecated in Drake release
414 - */
415 - @Deprecated
416 - Builder setUdpDst(short port);
417 -
418 - /**
419 - * Sets the dst UDP port.
420 - *
421 - * @param port a port number
422 - * @return a treatment builder
423 */ 363 */
424 Builder setUdpDst(TpPort port); 364 Builder setUdpDst(TpPort port);
425 365
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
16 package org.onosproject.provider.of.flow.impl; 16 package org.onosproject.provider.of.flow.impl;
17 17
18 import com.google.common.collect.Lists; 18 import com.google.common.collect.Lists;
19 +
20 +import org.onlab.packet.EthType;
19 import org.onlab.packet.Ip4Address; 21 import org.onlab.packet.Ip4Address;
20 import org.onlab.packet.Ip4Prefix; 22 import org.onlab.packet.Ip4Prefix;
21 import org.onlab.packet.Ip6Address; 23 import org.onlab.packet.Ip6Address;
...@@ -359,7 +361,7 @@ public class FlowEntryBuilder { ...@@ -359,7 +361,7 @@ public class FlowEntryBuilder {
359 break; 361 break;
360 case POP_MPLS: 362 case POP_MPLS:
361 OFActionPopMpls popMpls = (OFActionPopMpls) act; 363 OFActionPopMpls popMpls = (OFActionPopMpls) act;
362 - builder.popMpls((short) popMpls.getEthertype().getValue()); 364 + builder.popMpls(new EthType(popMpls.getEthertype().getValue()));
363 break; 365 break;
364 case PUSH_MPLS: 366 case PUSH_MPLS:
365 builder.pushMpls(); 367 builder.pushMpls();
......
...@@ -17,6 +17,7 @@ package org.onosproject.provider.of.group.impl; ...@@ -17,6 +17,7 @@ package org.onosproject.provider.of.group.impl;
17 17
18 import com.google.common.collect.Lists; 18 import com.google.common.collect.Lists;
19 19
20 +import org.onlab.packet.EthType;
20 import org.onlab.packet.Ip4Address; 21 import org.onlab.packet.Ip4Address;
21 import org.onlab.packet.MacAddress; 22 import org.onlab.packet.MacAddress;
22 import org.onlab.packet.MplsLabel; 23 import org.onlab.packet.MplsLabel;
...@@ -213,7 +214,7 @@ public class GroupBucketEntryBuilder { ...@@ -213,7 +214,7 @@ public class GroupBucketEntryBuilder {
213 break; 214 break;
214 case POP_MPLS: 215 case POP_MPLS:
215 OFActionPopMpls popMpls = (OFActionPopMpls) act; 216 OFActionPopMpls popMpls = (OFActionPopMpls) act;
216 - builder.popMpls((short) popMpls.getEthertype().getValue()); 217 + builder.popMpls(new EthType(popMpls.getEthertype().getValue()));
217 break; 218 break;
218 case PUSH_MPLS: 219 case PUSH_MPLS:
219 OFActionPushMpls pushMpls = (OFActionPushMpls) act; 220 OFActionPushMpls pushMpls = (OFActionPushMpls) act;
......