Returns the virtual host from the invocation
543515
private CharSequence hostInvocation()
    throws IOException
  {
    if (_host != null) {
    }
    else if (_uriHost.length() > 0) {
      _host = _uriHost;
    }
    else if ((_host = getForwardedHostHeader()) != null) {
    }
    else if ((_host = getHostHeader()) != null) {
    }
    else if (HTTP_1_1 <= version()) {
      throw new BadRequestException(L.l("HTTP/1.1 requires a Host header (Remote IP={0})", 
                                        connTcp().ipRemote()));
    }

    return _host;
  }
665074
public String getHostsUsed() {
		String hostsUsed= new String();
		StringBuilder strBldr = new StringBuilder();
	
		Set<Entry<String,CassandraHost>> se= m_hostsUsed.entrySet();
		
		for (Entry<String, CassandraHost> entry : se) 
		{
			strBldr.append(entry.getValue().toString());
			strBldr.append(';');	
		}
		if(se.size()>0 && strBldr.length()>0)
		{
			hostsUsed=strBldr.substring(0, strBldr.length()-1);
		}
		return hostsUsed;
	}
200156
protected synchronized void setVirtualHost(VirtualHost virtualHost) {
        this.virtualHost = virtualHost;
        if (!activeContextRoots.isEmpty()) {
            for (String contextRoot : activeContextRoots) {
                virtualHost.addContextRoot(contextRoot, this);
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "add virtual host " + virtualHost);
        }
    }
534466
def host(self, value=None):
        
        if value is not None:
            return URL._mutate(self, host=value)
        return self._tuple.host
162722
function getHostType(host) {
  if (net.isIPv4(host)) {
    return ATYP_V4;
  }
  if (net.isIPv6(host)) {
    return ATYP_V6;
  }
  return ATYP_DOMAIN;
}
1009
def _get_host(self):
        
        if 'VCAP_SERVICES' in os.environ:
            services = json.loads(os.getenv('VCAP_SERVICES'))
            host = services['predix-blobstore'][0]['credentials']['host']
        else:
            host = predix.config.get_env_value(self, 'host')

        # Protocol may not always be included in host setting
        if 'https://' not in host:
            host = 'https://' + host

        return host
557784
def __get_host(node, vm_):
    '''
    
    '''
    if __get_ssh_interface(vm_) == 'private_ips' or vm_['external_ip'] is None:
        ip_address = node.private_ips[0]
        log.info('Salt node data. Private_ip: %s', ip_address)
    else:
        ip_address = node.public_ips[0]
        log.info('Salt node data. Public_ip: %s', ip_address)

    if ip_address:
        return ip_address

    return node.name
1102654
def _cli_helper_dedicated_host(env, result, table):
    """"""

    dedicated_host_id = utils.lookup(result, 'dedicatedHost', 'id')
    if dedicated_host_id:
        table.add_row(['dedicated_host_id', dedicated_host_id])
        # Try to find name of dedicated host
        try:
            dedicated_host = env.client.call('Virtual_DedicatedHost', 'getObject',
                                             id=dedicated_host_id)
        except SoftLayer.SoftLayerAPIError:
            LOGGER.error('Unable to get dedicated host id %s', dedicated_host_id)
            dedicated_host = {}
        table.add_row(['dedicated_host',
                       dedicated_host.get('name') or formatting.blank()])
445858
def get_host_map(root):
  ''' 
  '''
  hosts_map = {}
  for host in root.get_all_hosts():
    hosts_map[host.hostId] = {"hostname": NAGIOS_HOSTNAME_FORMAT % (host.hostname,),
                              "address": host.ipAddress}

  ''' Also define "virtual hosts" for the CM clusters- they will be the hosts
      to which CM services are mapped
  '''
  for cluster in root.get_all_clusters():
    hosts_map[cluster.name] = {"hostname": cluster.name,
                               "address": quote(cluster.name)}
  hosts_map[CM_DUMMY_HOST] = {"hostname": CM_DUMMY_HOST,
                              "address": CM_DUMMY_HOST}
  return hosts_map
852510
def get_vcenter_vm_uuid_by_name(host, user, password, vm_name):
    
    vc = VcenterInterface(host, user, password)
    vmi = VmInterface(vc, vm_name)
    return vmi.get_instance_uuid()
1359867
def virtual_host(server)
      @virtual_hosts << server
      @virtual_hosts = @virtual_hosts.sort_by{|s|
        num = 0
        num -= 4 if s[:BindAddress]
        num -= 2 if s[:Port]
        num -= 1 if s[:ServerName]
        num
      }
    end
666151
def get_host_vsan_system(service_instance, host_ref, hostname=None):
    '''
    
    '''
    if not hostname:
        hostname = salt.utils.vmware.get_managed_object_name(host_ref)
    traversal_spec = vmodl.query.PropertyCollector.TraversalSpec(
        path='configManager.vsanSystem',
        type=vim.HostSystem,
        skip=False)
    objs = salt.utils.vmware.get_mors_with_properties(
        service_instance, vim.HostVsanSystem, property_list=['config.enabled'],
        container_ref=host_ref, traversal_spec=traversal_spec)
    if not objs:
        raise VMwareObjectRetrievalError('Host\'s \'{0}\' VSAN system was '
                                         'not retrieved'.format(hostname))
    log.trace('[%s] Retrieved VSAN system', hostname)
    return objs[0]['object']
965654
def get_host(self, host):
        '''  '''

        if len(self.index) == 0:
            # Need to load index from cache
            self.load_index_from_cache()

        if not host in self.index:
            # try updating the cache
            self.do_api_calls_update_cache()
            if not host in self.index:
                # host might not exist anymore
                return {}

        (region, instance_id) = self.index[host]

        instance = self.get_instance(region, instance_id)
        return self.get_host_info_dict_from_instance(instance)
587298
private static String getHostAddress(InetSocketAddress addr) {
    String hostToAppend = "";
    if (addr.isUnresolved()) {
      hostToAppend = addr.getHostName();
    } else {
      hostToAppend = addr.getAddress().getHostAddress();
    }
    return hostToAppend;
  }
257371
public static String getHostname()
    {
        String      host = "unknown";
        try
        {
            return InetAddress.getLocalHost().getHostName();
        }
        catch ( UnknownHostException e )
        {
            // ignore
        }
        return host;
    }
1035071
def get_host(environ):
    # type: (Dict[str, str]) -> str
    """"""
    if environ.get("HTTP_HOST"):
        rv = environ["HTTP_HOST"]
        if environ["wsgi.url_scheme"] == "http" and rv.endswith(":80"):
            rv = rv[:-3]
        elif environ["wsgi.url_scheme"] == "https" and rv.endswith(":443"):
            rv = rv[:-4]
    elif environ.get("SERVER_NAME"):
        rv = environ["SERVER_NAME"]
        if (environ["wsgi.url_scheme"], environ["SERVER_PORT"]) not in (
            ("https", "443"),
            ("http", "80"),
        ):
            rv += ":" + environ["SERVER_PORT"]
    else:
        # In spite of the WSGI spec, SERVER_NAME might not be present.
        rv = "unknown"

    return rv
343055
def get_host(self, name, default=NoHostError):
        '''
        
        '''

        if name in self.hosts:
            return self.hosts[name]

        if default is NoHostError:
            raise NoHostError('No such host: {0}'.format(name))

        return default