Ray Milkey
Committed by Gerrit Code Review

Remove methods deprecated in Drake from TrafficTreatment API

Change-Id: I9de9331611c79ae60195c738ee1d3912f4081e3d
......@@ -15,8 +15,6 @@
*/
package org.onosproject.net.flow;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.List;
import java.util.Objects;
......@@ -28,7 +26,6 @@ import org.onlab.packet.TpPort;
import org.onlab.packet.VlanId;
import org.onosproject.core.GroupId;
import org.onosproject.net.DeviceId;
import org.onosproject.net.IndexedLambda;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.instructions.ExtensionTreatment;
import org.onosproject.net.flow.instructions.Instruction;
......@@ -39,6 +36,8 @@ import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Default traffic treatment implementation.
*/
......@@ -351,11 +350,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
}
@Override
public Builder popMpls(int etherType) {
return add(Instructions.popMpls(new EthType(etherType)));
}
@Override
public Builder popMpls(EthType etherType) {
return add(Instructions.popMpls(etherType));
}
......@@ -375,14 +369,6 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
return add(Instructions.decMplsTtl());
}
@Deprecated
@Override
/**
* @deprecated 1.3.0 Drake Release
*/
public Builder setLambda(short lambda) {
return add(Instructions.modL0Lambda(new IndexedLambda(lambda)));
}
@Override
public Builder group(GroupId groupId) {
......@@ -447,57 +433,21 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
return add(Instructions.modTunnelId(tunnelId));
}
@Deprecated
@Override
/**
* @deprecated 1.3.0 Drake Release
*/
public TrafficTreatment.Builder setTcpSrc(short port) {
return setTcpSrc(TpPort.tpPort(port));
}
@Override
public TrafficTreatment.Builder setTcpSrc(TpPort port) {
return add(Instructions.modTcpSrc(port));
}
@Deprecated
@Override
/**
* @deprecated 1.3.0 Drake Release
*/
public TrafficTreatment.Builder setTcpDst(short port) {
return setTcpDst(TpPort.tpPort(port));
}
@Override
public TrafficTreatment.Builder setTcpDst(TpPort port) {
return add(Instructions.modTcpDst(port));
}
@Deprecated
@Override
/**
* @deprecated 1.3.0 Drake Release
*/
public TrafficTreatment.Builder setUdpSrc(short port) {
return setUdpSrc(TpPort.tpPort(port));
}
@Override
public TrafficTreatment.Builder setUdpSrc(TpPort port) {
return add(Instructions.modUdpSrc(port));
}
@Deprecated
@Override
/**
* @deprecated 1.3.0 Drake Release
*/
public TrafficTreatment.Builder setUdpDst(short port) {
return setUdpDst(TpPort.tpPort(port));
}
@Override
public TrafficTreatment.Builder setUdpDst(TpPort port) {
return add(Instructions.modUdpDst(port));
......
......@@ -208,16 +208,6 @@ public interface TrafficTreatment {
*
* @param etherType an ether type
* @return a treatment builder
* @deprecated in Drake Release
*/
@Deprecated
Builder popMpls(int etherType);
/**
* Pops MPLS ether type and set the new ethertype.
*
* @param etherType an ether type
* @return a treatment builder
*/
Builder popMpls(EthType etherType);
......@@ -245,16 +235,6 @@ public interface TrafficTreatment {
Builder decMplsTtl();
/**
* Sets the optical channel ID or lambda.
*
* @param lambda optical channel ID
* @return a treatment builder
* @deprecated in Drake Release
*/
@Deprecated
Builder setLambda(short lambda);
/**
* Sets the group ID.
*
* @param groupId group ID
......@@ -356,16 +336,6 @@ public interface TrafficTreatment {
*
* @param port a port number
* @return a treatment builder
* @deprecated in Drake release
*/
@Deprecated
Builder setTcpSrc(short port);
/**
* Sets the src TCP port.
*
* @param port a port number
* @return a treatment builder
*/
Builder setTcpSrc(TpPort port);
......@@ -374,16 +344,6 @@ public interface TrafficTreatment {
*
* @param port a port number
* @return a treatment builder
* @deprecated in Drake release
*/
@Deprecated
Builder setTcpDst(short port);
/**
* Sets the dst TCP port.
*
* @param port a port number
* @return a treatment builder
*/
Builder setTcpDst(TpPort port);
......@@ -392,16 +352,6 @@ public interface TrafficTreatment {
*
* @param port a port number
* @return a treatment builder
* @deprecated in Drake release
*/
@Deprecated
Builder setUdpSrc(short port);
/**
* Sets the src UDP port.
*
* @param port a port number
* @return a treatment builder
*/
Builder setUdpSrc(TpPort port);
......@@ -410,16 +360,6 @@ public interface TrafficTreatment {
*
* @param port a port number
* @return a treatment builder
* @deprecated in Drake release
*/
@Deprecated
Builder setUdpDst(short port);
/**
* Sets the dst UDP port.
*
* @param port a port number
* @return a treatment builder
*/
Builder setUdpDst(TpPort port);
......
......@@ -16,6 +16,8 @@
package org.onosproject.provider.of.flow.impl;
import com.google.common.collect.Lists;
import org.onlab.packet.EthType;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.Ip4Prefix;
import org.onlab.packet.Ip6Address;
......@@ -359,7 +361,7 @@ public class FlowEntryBuilder {
break;
case POP_MPLS:
OFActionPopMpls popMpls = (OFActionPopMpls) act;
builder.popMpls((short) popMpls.getEthertype().getValue());
builder.popMpls(new EthType(popMpls.getEthertype().getValue()));
break;
case PUSH_MPLS:
builder.pushMpls();
......
......@@ -17,6 +17,7 @@ package org.onosproject.provider.of.group.impl;
import com.google.common.collect.Lists;
import org.onlab.packet.EthType;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.MacAddress;
import org.onlab.packet.MplsLabel;
......@@ -213,7 +214,7 @@ public class GroupBucketEntryBuilder {
break;
case POP_MPLS:
OFActionPopMpls popMpls = (OFActionPopMpls) act;
builder.popMpls((short) popMpls.getEthertype().getValue());
builder.popMpls(new EthType(popMpls.getEthertype().getValue()));
break;
case PUSH_MPLS:
OFActionPushMpls pushMpls = (OFActionPushMpls) act;
......