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/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
index c2e2019..d1c8b2a 100644
--- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
+++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
@@ -184,7 +184,7 @@
// Set up test expectation
reset(hostService);
- expect(hostService.getHostsByIp(anyObject(IpPrefix.class))).andReturn(
+ expect(hostService.getHostsByIp(anyObject(IpAddress.class))).andReturn(
new HashSet<Host>()).anyTimes();
hostService.startMonitoringIp(IpAddress.valueOf("192.168.10.1"));
replay(hostService);
@@ -203,7 +203,7 @@
new HostLocation(
SW1_ETH1.deviceId(),
SW1_ETH1.port(), 1),
- Sets.newHashSet(IpPrefix.valueOf("192.168.10.1/32")));
+ Sets.newHashSet(IpAddress.valueOf("192.168.10.1")));
internalHostListener.event(
new HostEvent(HostEvent.Type.HOST_ADDED, host));
@@ -266,7 +266,7 @@
// Set up test expectation
reset(hostService);
- expect(hostService.getHostsByIp(anyObject(IpPrefix.class))).andReturn(
+ expect(hostService.getHostsByIp(anyObject(IpAddress.class))).andReturn(
new HashSet<Host>()).anyTimes();
hostService.startMonitoringIp(IpAddress.valueOf("192.168.20.1"));
replay(hostService);
@@ -286,7 +286,7 @@
new HostLocation(
SW2_ETH1.deviceId(),
SW2_ETH1.port(), 1),
- Sets.newHashSet(IpPrefix.valueOf("192.168.20.1/32")));
+ Sets.newHashSet(IpAddress.valueOf("192.168.20.1")));
internalHostListener.event(
new HostEvent(HostEvent.Type.HOST_ADDED, host));