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/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java
index c20da19..67e6cc4 100644
--- a/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java
+++ b/core/net/src/test/java/org/onlab/onos/net/host/impl/HostManagerTest.java
@@ -58,8 +58,8 @@
private static final HostId HID1 = HostId.hostId(MAC1, VLAN1);
private static final HostId HID2 = HostId.hostId(MAC2, VLAN1);
- private static final IpPrefix IP1 = IpPrefix.valueOf("10.0.0.1");
- private static final IpPrefix IP2 = IpPrefix.valueOf("10.0.0.2");
+ private static final IpAddress IP1 = IpAddress.valueOf("10.0.0.1");
+ private static final IpAddress IP2 = IpAddress.valueOf("10.0.0.2");
private static final DeviceId DID1 = DeviceId.deviceId("of:001");
private static final DeviceId DID2 = DeviceId.deviceId("of:002");
@@ -115,7 +115,7 @@
}
private void detect(HostId hid, MacAddress mac, VlanId vlan,
- HostLocation loc, IpPrefix ip) {
+ HostLocation loc, IpAddress ip) {
HostDescription descr = new DefaultHostDescription(mac, vlan, loc, ip);
providerService.hostDetected(hid, descr);
assertNotNull("host should be found", mgr.getHost(hid));