Merge "Remove reference to deprecated RequestContext.user"

This commit is contained in:
Zuul 2022-03-18 18:43:36 +00:00 committed by Gerrit Code Review
commit b269b3d1d0
1 changed files with 4 additions and 4 deletions

View File

@ -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