// Get the host field of the given PBD.
499528
func (_class PBDClass) GetHost(sessionID SessionRef, self PBDRef) (_retval HostRef, _err error) {
	_method := "PBD.get_host"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPBDRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostRefToGo(_method + " -> ", _result.Value)
	return
}
971360
func (_class HostClass) GetDisplay(sessionID SessionRef, self HostRef) (_retval HostDisplay, _err error) {
	_method := "host.get_display"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertEnumHostDisplayToGo(_method + " -> ", _result.Value)
	return
}
1023446
func getHostsSlice(records []dns.SrvRecord) []string {
	var hosts []string
	for _, r := range records {
		hosts = append(hosts, r.Host)
	}
	return hosts
}
412186
func (f *Facade) GetHostByIP(ctx datastore.Context, hostIP string) (*host.Host, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetHostByIP"))
	return f.hostStore.GetHostByIP(ctx, hostIP)
}
269335
func (c *Client) GetServicesForHost(ctx context.Context, ip string, options *HostServicesOptions) (*Host, error) {
	var host Host

	req, err := c.NewRequest("GET", hostPath+"/"+ip, options, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &host); err != nil {
		return nil, err
	}

	return &host, nil
}
546014
func getHostID() (hostid string, err error) {
	cmd := exec.Command(hostIDCmdString)
	stdout, err := cmd.Output()
	if err != nil {
		return hostid, err
	}
	return strings.TrimSpace(string(stdout)), err
}
170580
func (_class FeatureClass) GetHost(sessionID SessionRef, self FeatureRef) (_retval HostRef, _err error) {
	_method := "Feature.get_host"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertFeatureRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostRefToGo(_method + " -> ", _result.Value)
	return
}
1217759
func (_class HostCPUClass) GetRecord(sessionID SessionRef, self HostCPURef) (_retval HostCPURecord, _err error) {
	_method := "host_cpu.get_record"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostCPURefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostCPURecordToGo(_method + " -> ", _result.Value)
	return
}
15263
func (_class HostPatchClass) GetRecord(sessionID SessionRef, self HostPatchRef) (_retval HostPatchRecord, _err error) {
	_method := "host_patch.get_record"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostPatchRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertHostPatchRecordToGo(_method + " -> ", _result.Value)
	return
}
383210
func (api *API) HostGetById(id string) (res *Host, err error) {
	hosts, err := api.HostsGet(Params{"hostids": id})
	if err != nil {
		return
	}

	if len(hosts) == 1 {
		res = &hosts[0]
	} else {
		e := ExpectedOneResult(len(hosts))
		err = &e
	}
	return
}
717618
func (d *DNSProvider) getHosts(sld, tld string) ([]Record, error) {
	request, err := d.newRequestGet("namecheap.domains.dns.getHosts",
		addParam("SLD", sld),
		addParam("TLD", tld),
	)
	if err != nil {
		return nil, err
	}

	var ghr getHostsResponse
	err = d.do(request, &ghr)
	if err != nil {
		return nil, err
	}

	if len(ghr.Errors) > 0 {
		return nil, fmt.Errorf("%s [%d]", ghr.Errors[0].Description, ghr.Errors[0].Number)
	}

	return ghr.Hosts, nil
}
1270120
func (a *LBClient) GetHostID(hostID *string) error {
	glog.V(4).Infof("ControlCenterAgent.GetHostID()")
	return a.rpcClient.Call("ControlCenterAgent.GetHostID", "na", hostID, 0)
}
445034
func GetEndorserClient(address, tlsRootCertFile string) (pb.EndorserClient, error) {
	var peerClient *PeerClient
	var err error
	if address != "" {
		peerClient, err = NewPeerClientForAddress(address, tlsRootCertFile)
	} else {
		peerClient, err = NewPeerClientFromEnv()
	}
	if err != nil {
		return nil, err
	}
	return peerClient.Endorser()
}
807935
func (_class HostPatchClass) GetApplied(sessionID SessionRef, self HostPatchRef) (_retval bool, _err error) {
	_method := "host_patch.get_applied"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostPatchRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertBoolToGo(_method + " -> ", _result.Value)
	return
}
607795
func GetEtcdProbeAddress(cfg *kubeadmapi.Etcd) string {
	if cfg.Local != nil && cfg.Local.ExtraArgs != nil {
		if arg, exists := cfg.Local.ExtraArgs[etcdListenClientURLsArg]; exists {
			// Use the first url in the listen-client-urls if multiple url's are specified.
			if strings.ContainsAny(arg, ",") {
				arg = strings.Split(arg, ",")[0]
			}
			parsedURL, err := url.Parse(arg)
			if err != nil || parsedURL.Hostname() == "" {
				return "127.0.0.1"
			}
			// Return the IP if the URL contains an address instead of a name.
			if ip := net.ParseIP(parsedURL.Hostname()); ip != nil {
				// etcdctl doesn't support auto-converting zero addresses into loopback addresses
				if ip.Equal(net.IPv4zero) {
					return "127.0.0.1"
				}
				if ip.Equal(net.IPv6zero) {
					return net.IPv6loopback.String()
				}
				return ip.String()
			}
			// Use the local resolver to try resolving the name within the URL.
			// If the name can not be resolved, return an IPv4 loopback address.
			// Otherwise, select the first valid IPv4 address.
			// If the name does not resolve to an IPv4 address, select the first valid IPv6 address.
			addrs, err := net.LookupIP(parsedURL.Hostname())
			if err != nil {
				return "127.0.0.1"
			}
			var ip net.IP
			for _, addr := range addrs {
				if addr.To4() != nil {
					ip = addr
					break
				}
				if addr.To16() != nil && ip == nil {
					ip = addr
				}
			}
			return ip.String()
		}
	}
	return "127.0.0.1"
}
787777
func GetAPIServerProbeAddress(endpoint *kubeadmapi.APIEndpoint) string {
	// In the case of a self-hosted deployment, the initial host on which kubeadm --init is run,
	// will generate a DaemonSet with a nodeSelector such that all nodes with the label
	// node-role.kubernetes.io/master='' will have the API server deployed to it. Since the init
	// is run only once on an initial host, the API advertise address will be invalid for any
	// future hosts that do not have the same address. Furthermore, since liveness and readiness
	// probes do not support the Downward API we cannot dynamically set the advertise address to
	// the node's IP. The only option then is to use localhost.
	if endpoint != nil && endpoint.AdvertiseAddress != "" {
		return endpoint.AdvertiseAddress
	}

	return "127.0.0.1"
}
1071203
func (r Virtual_DedicatedHost) GetPciDevices() (resp []datatypes.Virtual_Host_PciDevice, err error) {
	err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &r.Options, &resp)
	return
}