From ab73b8f4a7013215cf51a772ddff48dacc72d4df Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 16 Mar 2022 17:17:50 +0900 Subject: [PATCH] Remove reference to deprecated RequestContext.user The user property of oslo_context.context.RequestContext has been deprecated in favor of the new user_id property. This change replaces reference to the deprecated user property. Change-Id: Ib5ca9b82970d217df5133b2498c3577af0e60dd9 --- sahara/context.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sahara/context.py b/sahara/context.py index 2727144ff5..5044e1601b 100644 --- a/sahara/context.py +++ b/sahara/context.py @@ -55,7 +55,7 @@ class Context(context.RequestContext): '{args}'.format(args=kwargs)) super(Context, self).__init__(auth_token=auth_token, - user=user_id, + user_id=user_id, project_id=tenant_id, is_admin=is_admin, resource_uuid=resource_uuid, @@ -108,9 +108,9 @@ class Context(context.RequestContext): return (self.service_catalog and self.auth_token and self.project_id and self.user_id) - # NOTE(adrienverge): The Context class uses the 'user' and 'tenant' - # properties internally (inherited from oslo_context), but Sahara code - # often uses 'user_id' and 'tenant_id'. + # NOTE(adrienverge): The Context class uses the 'tenant' property + # internally (inherited from oslo_context), but Sahara code often uses + # 'tenant_id'. @property def user_id(self): return self.user