docs: def get_hacluster_config(exclude_keys=None):
      '''
      Obtains all relevant configuration from charm configuration required
      for initiating a relation to hacluster:
  
          ha-bindiface, ha-mcastport, vip, os-internal-hostname,
          os-admin-hostname, os-public-hostname, os-access-hostname
  
      param: exclude_keys: list of setting key(s) to be excluded.
      returns: dict: A dict containing settings keyed by setting name.
      raises: HAIncompleteConfig if settings are missing or incorrect.
      '''
      settings = ['ha-bindiface', 'ha-mcastport', 'vip', 'os-internal-hostname',
                  'os-admin-hostname', 'os-public-hostname', 'os-access-hostname']
      conf = {}
      for setting in settings:
          if exclude_keys and setting in exclude_keys:
              continue
  
          conf[setting] = config_get(setting)
  
      if not valid_hacluster_config():
          raise HAIncorrectConfig('Insufficient or incorrect config data to '
                                  'configure hacluster.')
      return conf