Merge "Extend the mistral context class"

This commit is contained in:
Zuul 2020-02-07 01:22:32 +00:00 committed by Gerrit Code Review
commit c8f3eb073f
1 changed files with 11 additions and 0 deletions

View File

@ -187,6 +187,17 @@ class MistralContext(object):
def __init__(self, security_ctx=None): def __init__(self, security_ctx=None):
self.security = security_ctx self.security = security_ctx
def __getattribute__(self, name):
deprecated = [
"auth_cacert", "auth_token", "auth_uri", "expires_at", "insecure",
"is_target", "is_trust_scoped", "project_id", "project_name",
"redelivered", "region_name", "service_catalog", "trust_id",
"user_name"
]
if name in deprecated:
return getattr(self.security, name)
return super(MistralContext, self).__getattribute__(name)
class MistralSecurityContext(object): class MistralSecurityContext(object):
def __init__(self, auth_uri=None, auth_cacert=None, insecure=None, def __init__(self, auth_uri=None, auth_cacert=None, insecure=None,