Committed by
Gerrit Code Review
remove hostDetected() method that was deprecated in Drake
Change-Id: Ib975d7c8f5cf8aec25a1990114ad516e2d273150
Showing
10 changed files
with
10 additions
and
23 deletions
... | @@ -585,7 +585,7 @@ public class DhcpManager implements DhcpService { | ... | @@ -585,7 +585,7 @@ public class DhcpManager implements DhcpService { |
585 | 585 | ||
586 | HostId hostId = HostId.hostId(mac, vlanId); | 586 | HostId hostId = HostId.hostId(mac, vlanId); |
587 | DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips); | 587 | DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips); |
588 | - hostProviderService.hostDetected(hostId, desc); | 588 | + hostProviderService.hostDetected(hostId, desc, false); |
589 | } | 589 | } |
590 | 590 | ||
591 | 591 | ... | ... |
... | @@ -30,19 +30,6 @@ public interface HostProviderService extends ProviderService<HostProvider> { | ... | @@ -30,19 +30,6 @@ public interface HostProviderService extends ProviderService<HostProvider> { |
30 | * | 30 | * |
31 | * @param hostId id of the host that been detected | 31 | * @param hostId id of the host that been detected |
32 | * @param hostDescription description of host and its location | 32 | * @param hostDescription description of host and its location |
33 | - * @deprecated in Drake release | ||
34 | - */ | ||
35 | - @Deprecated | ||
36 | - default void hostDetected(HostId hostId, HostDescription hostDescription) { | ||
37 | - hostDetected(hostId, hostDescription, false); | ||
38 | - } | ||
39 | - | ||
40 | - /** | ||
41 | - * Notifies the core when a host has been detected on a network along with | ||
42 | - * information that identifies the host location. | ||
43 | - * | ||
44 | - * @param hostId id of the host that been detected | ||
45 | - * @param hostDescription description of host and its location | ||
46 | * @param replaceIps replace IP set if true, merge IP set otherwise | 33 | * @param replaceIps replace IP set if true, merge IP set otherwise |
47 | */ | 34 | */ |
48 | void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps); | 35 | void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps); | ... | ... |
... | @@ -125,7 +125,7 @@ public class HostManagerTest { | ... | @@ -125,7 +125,7 @@ public class HostManagerTest { |
125 | private void detect(HostId hid, MacAddress mac, VlanId vlan, | 125 | private void detect(HostId hid, MacAddress mac, VlanId vlan, |
126 | HostLocation loc, IpAddress ip) { | 126 | HostLocation loc, IpAddress ip) { |
127 | HostDescription descr = new DefaultHostDescription(mac, vlan, loc, ip); | 127 | HostDescription descr = new DefaultHostDescription(mac, vlan, loc, ip); |
128 | - providerService.hostDetected(hid, descr); | 128 | + providerService.hostDetected(hid, descr, false); |
129 | assertNotNull("host should be found", mgr.getHost(hid)); | 129 | assertNotNull("host should be found", mgr.getHost(hid)); |
130 | } | 130 | } |
131 | 131 | ... | ... |
... | @@ -297,7 +297,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid | ... | @@ -297,7 +297,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid |
297 | VlanId vlan, HostLocation hloc) { | 297 | VlanId vlan, HostLocation hloc) { |
298 | HostDescription desc = new DefaultHostDescription(mac, vlan, hloc); | 298 | HostDescription desc = new DefaultHostDescription(mac, vlan, hloc); |
299 | try { | 299 | try { |
300 | - providerService.hostDetected(hid, desc); | 300 | + providerService.hostDetected(hid, desc, false); |
301 | } catch (IllegalStateException e) { | 301 | } catch (IllegalStateException e) { |
302 | log.debug("Host {} suppressed", hid); | 302 | log.debug("Host {} suppressed", hid); |
303 | } | 303 | } |
... | @@ -319,7 +319,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid | ... | @@ -319,7 +319,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid |
319 | new DefaultHostDescription(mac, vlan, hloc) : | 319 | new DefaultHostDescription(mac, vlan, hloc) : |
320 | new DefaultHostDescription(mac, vlan, hloc, ip); | 320 | new DefaultHostDescription(mac, vlan, hloc, ip); |
321 | try { | 321 | try { |
322 | - providerService.hostDetected(hid, desc); | 322 | + providerService.hostDetected(hid, desc, false); |
323 | } catch (IllegalStateException e) { | 323 | } catch (IllegalStateException e) { |
324 | log.debug("Host {} suppressed", hid); | 324 | log.debug("Host {} suppressed", hid); |
325 | } | 325 | } | ... | ... |
... | @@ -39,6 +39,6 @@ public class ConfiguredTopologySimulator extends TopologySimulator { | ... | @@ -39,6 +39,6 @@ public class ConfiguredTopologySimulator extends TopologySimulator { |
39 | protected void createHosts() { | 39 | protected void createHosts() { |
40 | hostService.getHosts() | 40 | hostService.getHosts() |
41 | .forEach(host -> hostProviderService | 41 | .forEach(host -> hostProviderService |
42 | - .hostDetected(host.id(), description(host))); | 42 | + .hostDetected(host.id(), description(host), false)); |
43 | } | 43 | } |
44 | } | 44 | } | ... | ... |
... | @@ -231,7 +231,7 @@ public abstract class TopologySimulator { | ... | @@ -231,7 +231,7 @@ public abstract class TopologySimulator { |
231 | ipBytes[3] = (byte) (i + 1); | 231 | ipBytes[3] = (byte) (i + 1); |
232 | HostId id = hostId(MacAddress.valueOf(macBytes), VlanId.NONE); | 232 | HostId id = hostId(MacAddress.valueOf(macBytes), VlanId.NONE); |
233 | IpAddress ip = IpAddress.valueOf(IpAddress.Version.INET, ipBytes); | 233 | IpAddress ip = IpAddress.valueOf(IpAddress.Version.INET, ipBytes); |
234 | - hostProviderService.hostDetected(id, description(id, ip, deviceId, port)); | 234 | + hostProviderService.hostDetected(id, description(id, ip, deviceId, port), false); |
235 | } | 235 | } |
236 | } | 236 | } |
237 | 237 | ... | ... |
... | @@ -124,7 +124,7 @@ public class OvsdbHostProvider extends AbstractProvider implements HostProvider | ... | @@ -124,7 +124,7 @@ public class OvsdbHostProvider extends AbstractProvider implements HostProvider |
124 | VlanId.vlanId(), | 124 | VlanId.vlanId(), |
125 | loaction, | 125 | loaction, |
126 | annotations); | 126 | annotations); |
127 | - providerService.hostDetected(hostId, hostDescription); | 127 | + providerService.hostDetected(hostId, hostDescription, false); |
128 | break; | 128 | break; |
129 | case PORT_REMOVED: | 129 | case PORT_REMOVED: |
130 | HostId host = HostId.hostId(subject.hwAddress(), VlanId.vlanId()); | 130 | HostId host = HostId.hostId(subject.hwAddress(), VlanId.vlanId()); | ... | ... |
... | @@ -439,7 +439,7 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider { | ... | @@ -439,7 +439,7 @@ class ConfigProvider implements DeviceProvider, LinkProvider, HostProvider { |
439 | 439 | ||
440 | DefaultHostDescription desc = | 440 | DefaultHostDescription desc = |
441 | new DefaultHostDescription(mac, vlanId, location, ips, annotations); | 441 | new DefaultHostDescription(mac, vlanId, location, ips, annotations); |
442 | - hostProviderService.hostDetected(hostId, desc); | 442 | + hostProviderService.hostDetected(hostId, desc, false); |
443 | 443 | ||
444 | connectPoints.add(location); | 444 | connectPoints.add(location); |
445 | } | 445 | } | ... | ... |
... | @@ -209,7 +209,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -209,7 +209,7 @@ public class HostsWebResource extends AbstractWebResource { |
209 | 209 | ||
210 | HostId hostId = HostId.hostId(mac, vlanId); | 210 | HostId hostId = HostId.hostId(mac, vlanId); |
211 | DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips, annotations); | 211 | DefaultHostDescription desc = new DefaultHostDescription(mac, vlanId, hostLocation, ips, annotations); |
212 | - hostProviderService.hostDetected(hostId, desc); | 212 | + hostProviderService.hostDetected(hostId, desc, false); |
213 | return hostId; | 213 | return hostId; |
214 | } | 214 | } |
215 | 215 | ... | ... |
... | @@ -365,7 +365,7 @@ public class HostResourceTest extends ResourceTest { | ... | @@ -365,7 +365,7 @@ public class HostResourceTest extends ResourceTest { |
365 | */ | 365 | */ |
366 | @Test | 366 | @Test |
367 | public void testPost() { | 367 | public void testPost() { |
368 | - mockHostProviderService.hostDetected(anyObject(), anyObject()); | 368 | + mockHostProviderService.hostDetected(anyObject(), anyObject(), anyBoolean()); |
369 | expectLastCall(); | 369 | expectLastCall(); |
370 | replay(mockHostProviderService); | 370 | replay(mockHostProviderService); |
371 | 371 | ... | ... |
-
Please register or login to post a comment