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