Returns a list of the hosts/agents that have been registered.
171977
@Override
  public List<String> listHosts() {
    try {
      // TODO (dano): only return hosts whose agents completed registration (i.e. has id nodes)
      return provider.get("listHosts").getChildren(Paths.configHosts());
    } catch (KeeperException.NoNodeException e) {
      return emptyList();
    } catch (KeeperException e) {
      throw new HeliosRuntimeException("listing hosts failed", e);
    }
  }
788562
def getHostsFromSGE():
    """"""
    with open(os.environ["PE_HOSTFILE"], 'r') as hosts:
        return [(host.split()[0], int(host.split()[1])) for host in hosts]
224339
def list_config_agents_handling_hosting_device(
            self, client, hosting_device_id, **_params):
        """"""
        resource_path = '/dev_mgr/hosting_devices/%s'
        return client.get((resource_path + HOSTING_DEVICE_CFG_AGENTS) %
                          hosting_device_id, params=_params)
220181
private ImmutableList<EndPoint> getEndPointsFromHostDiscovery() {
        Iterable<ServiceEndPoint> hosts = _hostDiscovery.getHosts();

        ImmutableList.Builder<EndPoint> endPoints = ImmutableList.builder();
        for (final ServiceEndPoint host : hosts) {
            if (host.equals(_self)) {
                continue;
            }
            endPoints.add(new EndPoint() {
                @Override
                public String getAddress() {
                    return _endPointAdapter.toEndPointAddress(host);
                }

                @Override
                public boolean isValid() {
                    return Iterables.contains(_hostDiscovery.getHosts(), host);
                }
            });
        }

        return endPoints.build();
    }
381683
def host_names(urls):
    '''
    
    '''
    host_names = StringCounter()
    for url in urls:
        host_names[urlparse(url).netloc] += urls[url]
    return host_names
1212025
def all_my_hosts_and_services(self):
        
        for what in (self.hosts, self.services):
            for item in what:
                yield item
120898
def hosts(self, **kwargs):
        
        kwargs['channelID'] = self.id
        return self.connection.listHosts(**kwargs)
87205
def get_queues(self):
        """"""
        res = self.celery.control.inspect().active_queues() or dict()
        return [result.get('name') for host in res.values() for result in host]
1289032
def _get_host(self, hostname):
        
        if hostname not in self.hosts:
            self.hosts[hostname] = {
                'groups': set(),
                'hostvars': {}
            }
        return self.hosts[hostname]
1213075
def list_agents(self):
        ''''''
        t = text_helper.Table(fields=("Agent ID", "Agent class", "State"),
                              lengths=(40, 25, 15))

        return t.render((a._descriptor.doc_id, a.log_category,
                         a._get_machine_state().name)
                        for a in self._agents)
1189798
def list_dhcp_agent_hosting_networks(self, network, **_params):
        """"""
        return self.get((self.network_path + self.DHCP_AGENTS) % network,
                        params=_params)
338816
def get_organism_hosts(cls, entry):
        

        query = "./organismHost/dbReference[@type='NCBI Taxonomy']"
        return [models.OrganismHost(taxid=x.get('id')) for x in entry.iterfind(query)]
1345261
def hosts
      entries.map do |entry|
        entry.is_a?(HostGroup) ? entry.hosts : entry
      end.flatten.uniq
    end
212455
def _list_available_hosts(self, *args):
        '''  '''

        return [ h for h in self.inventory.list_hosts(*args) if (h not in self.stats.failures) and (h not in self.stats.dark)]
558796
def complete_hosts(self, text, line, begidx, endidx):
        ""

        commands = ["add", "remove", "dc"]

        mline = line.partition(' ')[2]
        offs = len(mline) - len(text)
        return [s[offs:] for s in commands if s.startswith(mline)]
1191913
def host_chairs(self):
        '''
        '''
        chairs = []
        # Host is guaranteed to be a committe or none.
        host = self.host()
        if host is None:
            return
        for member, full_member in host.members_objects:
            if 'chair' in member.get('role', '').lower():
                chairs.append((member, full_member))
        return chairs
723375
def get_host_info():
    
    host_info = {}
    for k, v in host_info_gatherers.items():
        try:
            host_info[k] = v()
        except IgnoreHostInfo:
            pass
    return host_info