Parses the global config and returns the hostname value

        Returns:
            dict: The configured value for hostname.  The returned dict
                object is intended to be merged into the resource dict
357523
def _parse_hostname(self):
        
        value = 'localhost'
        match = re.search(r'^hostname ([^\s]+)$', self.config, re.M)
        if match:
            value = match.group(1)
        return dict(hostname=value)
367430
def get_config(self):
        
        # Fill this dict with config data
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'projection_count': self.projection_count,
            'normals': self.normals,
            'tree_root': self.tree_root,
            'minimum_result_size': self.minimum_result_size
        }
747443
def getParams(self):
        
        cur = self._conn.cursor()
        cur.execute("SHOW GLOBAL VARIABLES")
        rows = cur.fetchall()
        info_dict = {}
        for row in rows:
            key = row[0]
            val = util.parse_value(row[1])
            info_dict[key] = val
        return info_dict
715569
def dns_get_conf(self, domainName, environment):
        
        response = self.client.service.dns_get_conf(domainName, environment)
        dns_config = CotendoDNS(response)
        return dns_config
328486
def global_config(cls, key, *args):
        '''  '''
        if args:
            cls.settings[key] = args[0]
        else:
            return cls.settings[key]
334097
def _parse_domain_id(self, config):
        
        match = re.search(r'domain-id (.+)$', config)
        value = match.group(1) if match else None
        return dict(domain_id=value)
975488
def _parse_config(self):
        
        config = self.get_block('mlag configuration')
        cfg = dict()
        cfg.update(self._parse_domain_id(config))
        cfg.update(self._parse_local_interface(config))
        cfg.update(self._parse_peer_address(config))
        cfg.update(self._parse_peer_link(config))
        cfg.update(self._parse_shutdown(config))
        return dict(config=cfg)
1297202
def config_dict(config):
    
    return dict(
        (key, getattr(config, key))
        for key in config.values
    )
871560
protected Configuration getGlobalConfiguration() {
		if (!globalConfigurationLoaded) {
			String location = getConfigurationDirectory();
			GlobalConfiguration.loadConfiguration(location);
			globalConfigurationLoaded = true;
		}
		return GlobalConfiguration.getConfiguration();
	}
1289032
def _get_host(self, hostname):
        
        if hostname not in self.hosts:
            self.hosts[hostname] = {
                'groups': set(),
                'hostvars': {}
            }
        return self.hosts[hostname]
983624
def get_hosts_dict(self) -> Dict:
        
        return {
            k: deserializer.inventory.InventoryElement.serialize(v).dict()
            for k, v in self.hosts.items()
        }
1120932
def _load_config(self):
        
        # load the global config
        with open(self.config_global_path, "r") as f_config:
            config = ordered_yaml_load(f_config)
        self.config_global = config

        # Load the local config
        if self.config_global_local_path:
            config = ordered_yaml_load(open(self.config_global_local_path, "r"))
            self.config_global_local = config

        self.config = merge_config(
            OrderedDict(
                [
                    ("global_config", self.config_global),
                    ("global_local", self.config_global_local),
                ]
            )
        )
580386
def connection_key(self):
        
        return "{host}:{namespace}:{username}".format(host=self.host, namespace=self.namespace, username=self.username)
944470
def as_dict(self):
        """"""
        return {config_name: getattr(self, config_name)
                for config_name, _ in self._iter_config_props()}
1109333
def host_stanzas(self, config_access):
        
        defn_lines = self.resolve_defn(config_access)
        for val_dict in self.variable_iter(config_access.get_variables()):
            subst = list(self.apply_substitutions(defn_lines, val_dict))
            host = subst[0]
            lines = [ConfigOutput.to_line('Host', [host])] + subst[1:]
            yield host, lines
832376
def config_parser_to_dict(config_parser):
    
    response = {}

    for section in config_parser.sections():
        for option in config_parser.options(section):
            response.setdefault(section, {})[option] = config_parser.get(section, option)

    return response
960112
def get_self_host(request_data):
        
        if 'http_host' in request_data:
            current_host = request_data['http_host']
        elif 'server_name' in request_data:
            current_host = request_data['server_name']
        else:
            raise Exception('No hostname defined')

        if ':' in current_host:
            current_host_data = current_host.split(':')
            possible_port = current_host_data[-1]
            try:
                possible_port = float(possible_port)
                current_host = current_host_data[0]
            except ValueError:
                current_host = ':'.join(current_host_data)

        return current_host