Merge "cfg.CONF must not be used directly"

This commit is contained in:
Zuul 2017-12-20 21:05:57 +00:00 committed by Gerrit Code Review
commit 9de823ac4c
2 changed files with 9 additions and 2 deletions

View File

@ -559,6 +559,8 @@ class AuthProtocol(BaseAuthProtocol):
_base.AUTHTOKEN_GROUP,
list_opts(),
conf)
if self._conf.oslo_conf_obj != cfg.CONF:
oslo_cache.configure(self._conf.oslo_conf_obj)
token_roles_required = self._conf.get('service_token_roles_required')
@ -957,9 +959,8 @@ class AuthProtocol(BaseAuthProtocol):
def _create_oslo_cache(self):
# having this as a function makes test mocking easier
conf = cfg.CONF
region = oslo_cache.create_region()
oslo_cache.configure_cache_region(conf, region)
oslo_cache.configure_cache_region(self._conf.oslo_conf_obj, region)
return region
def _token_cache_factory(self):

View File

@ -0,0 +1,6 @@
---
fixes:
- >
[`bug 1737119 <https://bugs.launchpad.net/keystonemiddleware/+bug/1737119>`_]
If the application was not using the global cfg.CONF object, the configuration
was not read from the configuration file. This have been fixed.