// Lists dedicated hosts.
420223
func (s *HostService) ListDedicatedHosts(p *ListDedicatedHostsParams) (*ListDedicatedHostsResponse, error) {
	resp, err := s.cs.newRequest("listDedicatedHosts", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListDedicatedHostsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
314266
func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1beta1.Deployment))
	})
	return ret, err
}
773497
func WhitelistAllRegistries() RegistryWhitelister {
	return &registryWhitelister{
		whitelist: []allowedHostPortGlobs{{host: "*", port: "*"}},
		pullSpecs: sets.NewString(),
	}
}
95369
func (_class HostClass) GetAllRecords(sessionID SessionRef) (_retval map[HostRef]HostRecord, _err error) {
	_method := "host.get_all_records"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostRefToHostRecordMapToGo(_method + " -> ", _result.Value)
	return
}
253086
func (*Service) ListPhysicalHosts(c context.Context, req *crimson.ListPhysicalHostsRequest) (*crimson.ListPhysicalHostsResponse, error) {
	hosts, err := listPhysicalHosts(c, database.Get(c), req)
	if err != nil {
		return nil, err
	}
	return &crimson.ListPhysicalHostsResponse{
		Hosts: hosts,
	}, nil
}
535119
func (s *SSHService) ListSSHKeyPairs(p *ListSSHKeyPairsParams) (*ListSSHKeyPairsResponse, error) {
	resp, err := s.cs.newRequest("listSSHKeyPairs", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListSSHKeyPairsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
280727
func (api *API) HostsGetByHostGroupIds(ids []string) (res Hosts, err error) {
	return api.HostsGet(Params{"groupids": ids})
}
143531
func (c *Host) ListVolumes() ([]*volume.Info, error) {
	var volumes []*volume.Info
	return volumes, c.c.Get("/storage/volumes", &volumes)
}
89779
func (mg *MailgunImpl) ListIPS(ctx context.Context, dedicated bool) ([]IPAddress, error) {
	r := newHTTPRequest(generatePublicApiUrl(mg, ipsEndpoint))
	r.setClient(mg.Client())
	if dedicated {
		r.addParameter("dedicated", "true")
	}
	r.setBasicAuth(basicAuthUser, mg.APIKey())

	var resp ipAddressListResponse
	if err := getResponseFromJSON(ctx, r, &resp); err != nil {
		return nil, err
	}
	var result []IPAddress
	for _, ip := range resp.Items {
		result = append(result, IPAddress{IP: ip})
	}
	return result, nil
}
602723
func (api *API) Hosts(ctx context.Context) []*Node {
	span, _ := tracing.StartSpanFromContext(ctx, "API.Hosts")
	defer span.Finish()
	return api.cluster.Nodes()
}
1333851
func (self *Domain) List() ([]*DomainInfoBase, error) {
	opts := &struct {
		Page int `xmlrpc:"page"`
	}{0}
	const perPage = 100
	params := []interface{}{self.Key, opts}
	domains := make([]*DomainInfoBase, 0)
	for {
		var res []interface{}
		if err := self.Call("domain.list", params, &res); err != nil {
			return nil, err
		}
		for _, r := range res {
			domain := ToDomainInfoBase(r.(map[string]interface{}))
			domains = append(domains, domain)
		}
		if len(res) < perPage {
			break
		}
		opts.Page++
	}
	return domains, nil
}
37537
func (vm *VM) listHostedServices() ([]hostedservice.HostedService, error) {
	sc, err := vm.getServiceClient()
	if err != nil {
		return nil, fmt.Errorf(errGetClient, err)
	}

	resp, err := sc.ListHostedServices()
	if err != nil {
		return nil, err
	}

	return resp.HostedServices, nil
}
931370
func (m *Cluster) GetHosts() []*core.Address {
	if m != nil {
		return m.Hosts
	}
	return nil
}
424843
func (s *Stat) HostInfos() *HostInfos {
	s.Lock()
	stats := C.sg_get_host_info(nil)
	s.Unlock()

	hi := &HostInfos{
		OSName:    C.GoString(stats.os_name),
		OSRelease: C.GoString(stats.os_release),
		OSVersion: C.GoString(stats.os_version),
		Platform:  C.GoString(stats.platform),
		HostName:  C.GoString(stats.hostname),
		NCPUs:     int(stats.ncpus),
		MaxCPUs:   int(stats.maxcpus),
		BitWidth:  int(stats.bitwidth),
		//TODO: uptime
	}

	return hi
}
396939
func (s *Scheduler) activeHostCount() int {
	count := 0
	for _, host := range s.hosts {
		if !host.Shutdown {
			count++
		}
	}
	return count
}
208703
func (c *Client) Hosts() ([]*Host, error) {
	insts, err := c.s.Instances()
	if err != nil {
		return nil, err
	}
	hosts := make([]*Host, len(insts))
	for i, inst := range insts {
		hosts[i] = NewHost(
			inst.Meta["id"],
			inst.Addr,
			c.h,
			HostTagsFromMeta(inst.Meta),
		)
	}
	return hosts, nil
}
1308929
func (s *StoragePoolService) ListStorageProviders(p *ListStorageProvidersParams) (*ListStorageProvidersResponse, error) {
	resp, err := s.cs.newRequest("listStorageProviders", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListStorageProvidersResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}