summaryrefslogtreecommitdiff
path: root/keystonemiddleware
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-26 18:29:26 +0000
committerGerrit Code Review <review@openstack.org>2018-10-26 18:29:26 +0000
commit55b61427911a84ebac27604e0ca50ded8eae60f9 (patch)
tree76b0e554688c773ff6559543a45b53b64e59f84a /keystonemiddleware
parentfc51082ef43e316bbfa65c16dd6483af1f2092e7 (diff)
parent0c0eae3b1eb537159f26c82647fb61cc3de8536a (diff)
downloadkeystonemiddleware-55b61427911a84ebac27604e0ca50ded8eae60f9.tar.gz
Merge "Expect paste.deploy and gnocchi/panko options"
Diffstat (limited to 'keystonemiddleware')
-rw-r--r--keystonemiddleware/_common/config.py11
-rw-r--r--keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py2
2 files changed, 7 insertions, 6 deletions
diff --git a/keystonemiddleware/_common/config.py b/keystonemiddleware/_common/config.py
index 3e38eba..de701b0 100644
--- a/keystonemiddleware/_common/config.py
+++ b/keystonemiddleware/_common/config.py
@@ -49,17 +49,18 @@ def _conf_values_type_convert(group_name, all_options, conf):
for k, v in conf.items():
dest = k
try:
- if v is not None:
+ # 'here' and '__file__' come from paste.deploy
+ # 'configkey' is added by panko and gnocchi
+ if v is not None and k not in ['here', '__file__', 'configkey']:
type_, dest = opt_types[k]
v = type_(v)
except KeyError: # nosec
- # This option is not known to auth_token. v is not converted.
_LOG.warning(
- 'The option "%s" in conf is not known to auth_token', k)
+ 'The option "%s" is not known to keystonemiddleware', k)
except ValueError as e:
raise exceptions.ConfigurationError(
- _('Unable to convert the value of %(key)s option into correct '
- 'type: %(ex)s') % {'key': k, 'ex': e})
+ _('Unable to convert the value of option "%(key)s" into '
+ 'correct type: %(ex)s') % {'key': k, 'ex': e})
opts[dest] = v
return opts
diff --git a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py
index 9051d71..43806a7 100644
--- a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py
+++ b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py
@@ -514,7 +514,7 @@ class GeneralAuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest,
conf = {
'wrong_key': '123'
}
- log = 'The option "wrong_key" in conf is not known to auth_token'
+ log = 'The option "wrong_key" is not known to keystonemiddleware'
auth_token.AuthProtocol(self.fake_app, conf)
self.assertThat(self.logger.output, matchers.Contains(log))