code: def read_config(ini_group=None):
      
      env_conf = dict(DEFAULT_CONFIG)
      for key in REQUIRED_CONFIG_KEYS.union(ALLOWED_CONFIG_KEYS):
          env_key = "CLOUDSTACK_{0}".format(key.upper())
          value = os.getenv(env_key)
          if value:
              env_conf[key] = value
  
      # overrides means we have a .ini to read
      overrides = os.getenv('CLOUDSTACK_OVERRIDES', '').strip()
  
      if not overrides and set(env_conf).issuperset(REQUIRED_CONFIG_KEYS):
          return env_conf
  
      ini_conf = read_config_from_ini(ini_group)
  
      overrides = {s.lower() for s in re.split(r'\W+', overrides)}
      config = dict(dict(env_conf, **ini_conf),
                    **{k: v for k, v in env_conf.items() if k in overrides})
  
      missings = REQUIRED_CONFIG_KEYS.difference(config)
      if missings:
          raise ValueError("the configuration is missing the following keys: " +
                           ", ".join(missings))
  
      # convert booleans values.
      bool_keys = ('dangerous_no_tls_verify',)
      for bool_key in bool_keys:
          if isinstance(config[bool_key], string_type):
              try:
                  config[bool_key] = strtobool(config[bool_key])
              except ValueError:
                  pass
  
      return config
docs: Read the configuration from the environment, or config.
  
      First it try to go for the environment, then it overrides
      those with the cloudstack.ini file.