renamed VLAN, IP, and MACAddress classes
Change-Id: Ib4df413db1f3d9ee96213fc487519536d7993c5b
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
index 24c49bb..c7c2fc8 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
@@ -2,9 +2,9 @@
import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.flow.criteria.Criterion.Type;
-import org.onlab.packet.IPAddress;
-import org.onlab.packet.MACAddress;
-import org.onlab.packet.VLANID;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
/**
* Factory class to create various traffic selection criteria.
@@ -34,7 +34,7 @@
* @param macValue MAC address value or wildcard mask
* @return match criterion
*/
- public static Criterion matchEthSrc(MACAddress mac) {
+ public static Criterion matchEthSrc(MacAddress mac) {
return new EthCriterion(mac, Type.ETH_SRC);
}
@@ -45,7 +45,7 @@
* @param macValue MAC address value or wildcard mask
* @return match criterion
*/
- public static Criterion matchEthDst(MACAddress mac) {
+ public static Criterion matchEthDst(MacAddress mac) {
return new EthCriterion(mac, Type.ETH_DST);
}
@@ -65,7 +65,7 @@
* @param vlanId vlan id value
* @return match criterion
*/
- public static Criterion matchVlanId(VLANID vlanId) {
+ public static Criterion matchVlanId(VlanId vlanId) {
return new VlanIdCriterion(vlanId);
}
@@ -95,7 +95,7 @@
* @param ip ip src value
* @return match criterion
*/
- public static Criterion matchIPSrc(IPAddress ip) {
+ public static Criterion matchIPSrc(IpAddress ip) {
return new IPCriterion(ip, Type.IPV4_SRC);
}
@@ -105,7 +105,7 @@
* @param ip ip src value
* @return match criterion
*/
- public static Criterion matchIPDst(IPAddress ip) {
+ public static Criterion matchIPDst(IpAddress ip) {
return new IPCriterion(ip, Type.IPV4_DST);
}
@@ -133,10 +133,10 @@
public static final class EthCriterion implements Criterion {
- private final MACAddress mac;
+ private final MacAddress mac;
private final Type type;
- public EthCriterion(MACAddress mac, Type type) {
+ public EthCriterion(MacAddress mac, Type type) {
this.mac = mac;
this.type = type;
}
@@ -146,7 +146,7 @@
return this.type;
}
- public MACAddress mac() {
+ public MacAddress mac() {
return this.mac;
}
}
@@ -173,10 +173,10 @@
public static final class IPCriterion implements Criterion {
- private final IPAddress ip;
+ private final IpAddress ip;
private final Type type;
- public IPCriterion(IPAddress ip, Type type) {
+ public IPCriterion(IpAddress ip, Type type) {
this.ip = ip;
this.type = type;
}
@@ -186,7 +186,7 @@
return this.type;
}
- public IPAddress ip() {
+ public IpAddress ip() {
return this.ip;
}
@@ -237,9 +237,9 @@
public static final class VlanIdCriterion implements Criterion {
- private final VLANID vlanId;
+ private final VlanId vlanId;
- public VlanIdCriterion(VLANID vlanId) {
+ public VlanIdCriterion(VlanId vlanId) {
this.vlanId = vlanId;
}
@@ -248,7 +248,7 @@
return Type.VLAN_VID;
}
- public VLANID vlanId() {
+ public VlanId vlanId() {
return vlanId;
}
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
index 270704e..06903e5 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/Instructions.java
@@ -8,9 +8,9 @@
import org.onlab.onos.net.flow.instructions.L3ModificationInstruction.L3SubType;
import org.onlab.onos.net.flow.instructions.L3ModificationInstruction.ModIPInstruction;
import org.onlab.onos.net.flow.instructions.L3ModificationInstruction.ModIPProtoInstruction;
-import org.onlab.packet.IPAddress;
-import org.onlab.packet.MACAddress;
-import org.onlab.packet.VLANID;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
/**
* Factory class for creating various traffic treatment instructions.
*/
@@ -45,7 +45,7 @@
* @param addr the mac address to modify to.
* @return a l2 modification
*/
- public static L2ModificationInstruction modL2Src(MACAddress addr) {
+ public static L2ModificationInstruction modL2Src(MacAddress addr) {
checkNotNull(addr, "Src l2 address cannot be null");
return new ModEtherInstruction(L2SubType.L2_SRC, addr);
}
@@ -55,7 +55,7 @@
* @param addr the mac address to modify to.
* @return a L2 modification
*/
- public static L2ModificationInstruction modL2Dst(MACAddress addr) {
+ public static L2ModificationInstruction modL2Dst(MacAddress addr) {
checkNotNull(addr, "Dst l2 address cannot be null");
return new L2ModificationInstruction.ModEtherInstruction(L2SubType.L2_DST, addr);
}
@@ -75,7 +75,7 @@
* @param vlanId the vlan id to modify to.
* @return a L2 modification
*/
- public static L2ModificationInstruction modVlanId(VLANID vlanId) {
+ public static L2ModificationInstruction modVlanId(VlanId vlanId) {
checkNotNull(vlanId, "VLAN id cannot be null");
return new L2ModificationInstruction.ModVlanIdInstruction(vlanId);
}
@@ -95,7 +95,7 @@
* @param addr the ip address to modify to.
* @return a L3 modification
*/
- public static L3ModificationInstruction modL3Src(IPAddress addr) {
+ public static L3ModificationInstruction modL3Src(IpAddress addr) {
checkNotNull(addr, "Src l3 address cannot be null");
return new ModIPInstruction(L3SubType.L3_SRC, addr);
}
@@ -105,7 +105,7 @@
* @param addr the ip address to modify to.
* @return a L3 modification
*/
- public static L3ModificationInstruction modL3Dst(IPAddress addr) {
+ public static L3ModificationInstruction modL3Dst(IpAddress addr) {
checkNotNull(addr, "Dst l3 address cannot be null");
return new ModIPInstruction(L3SubType.L3_DST, addr);
}
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
index da86e13..5490de2 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
@@ -1,7 +1,7 @@
package org.onlab.onos.net.flow.instructions;
-import org.onlab.packet.MACAddress;
-import org.onlab.packet.VLANID;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
/**
* Abstraction of a single traffic treatment step.
@@ -56,9 +56,9 @@
public static final class ModEtherInstruction extends L2ModificationInstruction {
private final SubType subtype;
- private final MACAddress mac;
+ private final MacAddress mac;
- public ModEtherInstruction(SubType subType, MACAddress addr) {
+ public ModEtherInstruction(SubType subType, MacAddress addr) {
this.subtype = subType;
this.mac = addr;
}
@@ -68,7 +68,7 @@
return this.subtype;
}
- public MACAddress mac() {
+ public MacAddress mac() {
return this.mac;
}
@@ -101,9 +101,9 @@
*/
public static final class ModVlanIdInstruction extends L2ModificationInstruction {
- public final VLANID vlanId;
+ public final VlanId vlanId;
- public ModVlanIdInstruction(VLANID vlanId) {
+ public ModVlanIdInstruction(VlanId vlanId) {
this.vlanId = vlanId;
}
@@ -112,7 +112,7 @@
return L2SubType.VLAN_ID;
}
- public VLANID vlanId() {
+ public VlanId vlanId() {
return this.vlanId;
}
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
index eb4d3b6..126c1f9 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
@@ -1,6 +1,6 @@
package org.onlab.onos.net.flow.instructions;
-import org.onlab.packet.IPAddress;
+import org.onlab.packet.IpAddress;
/**
* Abstraction of a single traffic treatment step.
@@ -47,9 +47,9 @@
public static final class ModIPInstruction extends L3ModificationInstruction {
private final SubType subtype;
- private final IPAddress ip;
+ private final IpAddress ip;
- public ModIPInstruction(SubType subType, IPAddress addr) {
+ public ModIPInstruction(SubType subType, IpAddress addr) {
this.subtype = subType;
this.ip = addr;
}
@@ -59,7 +59,7 @@
return this.subtype;
}
- public IPAddress ip() {
+ public IpAddress ip() {
return this.ip;
}