@Test public void testUpdateHost() throws Exception { provider.updateHost(mac, vlan, hloc, ips); assertThat(providerService.hostId, is(hostId)); assertThat(providerService.hostDescription, is(hostDescription)); assertThat(providerService.event, is("hostDetected")); providerService.clear(); }
protected void updateHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { HostId hid = HostId.hostId(mac, vlan); HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); providerService.hostDetected(hid, desc, true); }
NetworkConfigHostProvider extends AbstractProvider implements HostProvider { protected void updateHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { HostId hid = HostId.hostId(mac, vlan); HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); providerService.hostDetected(hid, desc, true); } }
NetworkConfigHostProvider extends AbstractProvider implements HostProvider { protected void updateHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { HostId hid = HostId.hostId(mac, vlan); HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); providerService.hostDetected(hid, desc, true); } NetworkConfigHostProvider(); }
NetworkConfigHostProvider extends AbstractProvider implements HostProvider { protected void updateHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { HostId hid = HostId.hostId(mac, vlan); HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); providerService.hostDetected(hid, desc, true); } NetworkConfigHostProvider(); @Override void triggerProbe(Host host); }
NetworkConfigHostProvider extends AbstractProvider implements HostProvider { protected void updateHost(MacAddress mac, VlanId vlan, HostLocation hloc, Set<IpAddress> ips) { HostId hid = HostId.hostId(mac, vlan); HostDescription desc = new DefaultHostDescription(mac, vlan, hloc, ips); providerService.hostDetected(hid, desc, true); } NetworkConfigHostProvider(); @Override void triggerProbe(Host host);  }