Replaced IpPrefix and IpAddress in the following methods
and cleanup related code:
- Host.ipAddresses()
- DefaultHost.ipAddresses()
- HostDescription.ipAddress()
- DefaultHostDescription.ipAddress()
- HostService.getHostsByIp()
- HostManager.getHostsByIp()
- HostStore.getHosts()
- GossipHostStore.getHosts()
- SimpleHostStore.getHosts()
- ProxyArpService.known()
- ProxyArpManager.known()
As a result of the above cleanup, the "hosts" CLI command outputs
the IP addresses as "1.2.3.4" instead of "1.2.3.4/32".
Also, the following REST calls might be affected as well with
the above format replacement:
- REST POST: config/topology
- REST GET: topology/graph
diff --git a/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java b/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java
index 2cd0edc..ec58b16 100644
--- a/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/host/DefaultHostDecriptionTest.java
@@ -4,7 +4,7 @@
import org.onlab.onos.net.DeviceId;
import org.onlab.onos.net.HostLocation;
import org.onlab.onos.net.PortNumber;
-import org.onlab.packet.IpPrefix;
+import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -20,7 +20,7 @@
private static final MacAddress MAC = MacAddress.valueOf("00:00:11:00:00:01");
private static final VlanId VLAN = VlanId.vlanId((short) 10);
- private static final IpPrefix IP = IpPrefix.valueOf("10.0.0.1");
+ private static final IpAddress IP = IpAddress.valueOf("10.0.0.1");
private static final HostLocation LOC = new HostLocation(
DeviceId.deviceId("of:foo"),
diff --git a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
index 92a5718..561b041 100644
--- a/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/host/HostEventTest.java
@@ -11,7 +11,7 @@
import org.onlab.onos.net.HostLocation;
import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.provider.ProviderId;
-import org.onlab.packet.IpPrefix;
+import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -27,9 +27,9 @@
PortNumber.portNumber(100),
123L
);
- Set<IpPrefix> ipset = Sets.newHashSet(
- IpPrefix.valueOf("10.0.0.1"),
- IpPrefix.valueOf("10.0.0.2")
+ Set<IpAddress> ipset = Sets.newHashSet(
+ IpAddress.valueOf("10.0.0.1"),
+ IpAddress.valueOf("10.0.0.2")
);
HostId hid = HostId.hostId(mac, vlan);
diff --git a/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java b/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java
index 2394302..a8085eb 100644
--- a/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java
+++ b/core/api/src/test/java/org/onlab/onos/net/host/HostServiceAdapter.java
@@ -7,7 +7,6 @@
import org.onlab.onos.net.Host;
import org.onlab.onos.net.HostId;
import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -41,7 +40,7 @@
}
@Override
- public Set<Host> getHostsByIp(IpPrefix ip) {
+ public Set<Host> getHostsByIp(IpAddress ip) {
return null;
}