From 5855d412624506b0c18eb758a73737314df6bc3c Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Tue, 4 Feb 2020 12:32:35 -0600 Subject: [PATCH] Extend the mistral context class This change extends our mistral context class to ensure that we're passing everything that tripleo-common will expect, which includes deprecated objects. Depends-On: https://review.opendev.org/#/c/706196/ Change-Id: I9dae28d597be0d11acaa35026f5316db4d6d8ae1 Signed-off-by: Kevin Carter --- tripleoclient/plugin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tripleoclient/plugin.py b/tripleoclient/plugin.py index 1512679ea..b8f2925da 100644 --- a/tripleoclient/plugin.py +++ b/tripleoclient/plugin.py @@ -187,6 +187,17 @@ class MistralContext(object): def __init__(self, security_ctx=None): 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): def __init__(self, auth_uri=None, auth_cacert=None, insecure=None,