Ray Milkey
Committed by Gerrit Code Review

remove hostDetected() method that was deprecated in Drake

Change-Id: Ib975d7c8f5cf8aec25a1990114ad516e2d273150
......@@ -585,7 +585,7 @@ public class DhcpManager implements DhcpService {
HostId hostId = HostId.hostId(mac, vlanId);
DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips);
hostProviderService.hostDetected(hostId, desc);
hostProviderService.hostDetected(hostId, desc, false);
}
......
......@@ -30,19 +30,6 @@ public interface HostProviderService extends ProviderService<HostProvider> {
*
* @param hostId id of the host that been detected
* @param hostDescription description of host and its location
* @deprecated in Drake release
*/
@Deprecated
default void hostDetected(HostId hostId, HostDescription hostDescription) {
hostDetected(hostId, hostDescription, false);
}
/**
* Notifies the core when a host has been detected on a network along with
* information that identifies the host location.
*
* @param hostId id of the host that been detected
* @param hostDescription description of host and its location
* @param replaceIps replace IP set if true, merge IP set otherwise
*/
void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps);
......
......@@ -125,7 +125,7 @@ public class HostManagerTest {
private void detect(HostId hid, MacAddress mac, VlanId vlan,
HostLocation loc, IpAddress ip) {
HostDescription descr = new DefaultHostDescription(mac, vlan, loc, ip);
providerService.hostDetected(hid, descr);
providerService.hostDetected(hid, descr, false);
assertNotNull("host should be found", mgr.getHost(hid));
}
......
......@@ -297,7 +297,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid
VlanId vlan, HostLocation hloc) {
HostDescription desc = new DefaultHostDescription(mac, vlan, hloc);
try {
providerService.hostDetected(hid, desc);
providerService.hostDetected(hid, desc, false);
} catch (IllegalStateException e) {
log.debug("Host {} suppressed", hid);
}
......@@ -319,7 +319,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid
new DefaultHostDescription(mac, vlan, hloc) :
new DefaultHostDescription(mac, vlan, hloc, ip);
try {
providerService.hostDetected(hid, desc);
providerService.hostDetected(hid, desc, false);
} catch (IllegalStateException e) {
log.debug("Host {} suppressed", hid);
}
......
......@@ -39,6 +39,6 @@ public class ConfiguredTopologySimulator extends TopologySimulator {
protected void createHosts() {
hostService.getHosts()
.forEach(host -> hostProviderService
.hostDetected(host.id(), description(host)));
.hostDetected(host.id(), description(host), false));
}
}
......
......@@ -231,7 +231,7 @@ public abstract class TopologySimulator {
ipBytes[3] = (byte) (i + 1);
HostId id = hostId(MacAddress.valueOf(macBytes), VlanId.NONE);
IpAddress ip = IpAddress.valueOf(IpAddress.Version.INET, ipBytes);
hostProviderService.hostDetected(id, description(id, ip, deviceId, port));
hostProviderService.hostDetected(id, description(id, ip, deviceId, port), false);
}
}
......
......@@ -124,7 +124,7 @@ public class OvsdbHostProvider extends AbstractProvider implements HostProvider
VlanId.vlanId(),
loaction,
annotations);
providerService.hostDetected(hostId, hostDescription);
providerService.hostDetected(hostId, hostDescription, false);
break;
case PORT_REMOVED:
HostId host = HostId.hostId(subject.hwAddress(), VlanId.vlanId());
......
......@@ -439,7 +439,7 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider {
DefaultHostDescription desc =
new DefaultHostDescription(mac, vlanId, location, ips, annotations);
hostProviderService.hostDetected(hostId, desc);
hostProviderService.hostDetected(hostId, desc, false);
connectPoints.add(location);
}
......
......@@ -209,7 +209,7 @@ public class HostsWebResource extends AbstractWebResource {
HostId hostId = HostId.hostId(mac, vlanId);
DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips, annotations);
hostProviderService.hostDetected(hostId, desc);
hostProviderService.hostDetected(hostId, desc, false);
return hostId;
}
......
......@@ -365,7 +365,7 @@ public class HostResourceTest extends ResourceTest {
*/
@Test
public void testPost() {
mockHostProviderService.hostDetected(anyObject(), anyObject());
mockHostProviderService.hostDetected(anyObject(), anyObject(), anyBoolean());
expectLastCall();
replay(mockHostProviderService);
......