Handle os_auth_token option in keystone config
I88c2f5aa914b5fb40b6dc16a256d3e385d9aaa23 changed the option name to auth_token for no good reason, breaking compatibility with current code. Let's support both values. Change-Id: I2b600b029a0e74265375dec1fe66651ab208eacd
This commit is contained in:
@@ -65,17 +65,16 @@ class KeystoneAuth(base.AuthBackend):
|
||||
the auth information.
|
||||
"""
|
||||
|
||||
token = self.conf.get('auth_token')
|
||||
def get_options(k):
|
||||
return self.conf.get(k, self.conf.get("os_%s" % k))
|
||||
|
||||
token = get_options('auth_token')
|
||||
if not token or not request.endpoint:
|
||||
# NOTE(flaper87): Lets assume all the
|
||||
# required information was provided
|
||||
# either through env variables or CLI
|
||||
# params. Let keystoneclient fail otherwise.
|
||||
|
||||
def get_options(k):
|
||||
k = k if k in self.conf else "os_"+k
|
||||
return self.conf.get(k, None)
|
||||
|
||||
ks_kwargs = {}
|
||||
keys = ("username", "password", "project_id",
|
||||
"project_name", "auth_url", "insecure",
|
||||
|
||||
Reference in New Issue
Block a user