def _load_config(self):
        try:
            scf = self.conf.glance_store.swift_store_config_file
            conf_file = self.conf.find_file(scf)
            CONFIG.read(conf_file)
        except Exception as e:
            msg = (i18n._("swift config file "
                          "%(conf)s:%(exc)s not found") %
                   {'conf': self.conf.glance_store.swift_store_config_file,
                    'exc': e})
            LOG.error(msg)
            raise exceptions.BadStoreConfiguration(store_name='swift',
                                                   reason=msg)
        account_params = {}
        account_references = CONFIG.sections()

        for ref in account_references:
            reference = {}
            try:
                for param in ('auth_address',
                              'user',
                              'key',
                              'project_domain_id',
                              'project_domain_name',
                              'user_domain_id',
                              'user_domain_name'):
                    reference[param] = CONFIG.get(ref, param)

                try:
                    reference['auth_version'] = CONFIG.get(ref, 'auth_version')
                except configparser.NoOptionError:
                    av = self.conf.glance_store.swift_store_auth_version
                    reference['auth_version'] = av

                account_params[ref] = reference
            except (__HOLE__, SyntaxError, configparser.NoOptionError) as e:
                LOG.exception(i18n._("Invalid format of swift store config"
                                     "cfg"))
        return account_params
dataset/ETHPy150Open openstack/glance_store/glance_store/_drivers/swift/utils.py/SwiftParams._load_config