Init oslo_context before magnum context init

Roles is added as a member of oslo.context since oslo 2.2.0
https://review.openstack.org/#/c/271928/
This causes magnum gate fail because roles is overwrited by
oslo_context. Let's init oslo_context first and then make
our local changes.

Change-Id: Iac8c568bd49fbc66d2d65c9b6083bc9895a8069c
Closes-Bug: #1549694
This commit is contained in:
Yang Hongyang 2016-02-25 19:56:43 +08:00
parent 6fbae6c8ed
commit b0b3a3db00
1 changed files with 8 additions and 8 deletions

View File

@ -29,6 +29,14 @@ class RequestContext(context.RequestContext):
:param domain_name: The name of the domain.
"""
super(RequestContext, self).__init__(auth_token=auth_token,
user=user_name,
tenant=project_name,
is_admin=is_admin,
read_only=read_only,
show_deleted=show_deleted,
request_id=request_id)
self.user_name = user_name
self.user_id = user_id
self.project_name = project_name
@ -41,14 +49,6 @@ class RequestContext(context.RequestContext):
self.trust_id = trust_id
self.all_tenants = all_tenants
super(RequestContext, self).__init__(auth_token=auth_token,
user=user_name,
tenant=project_name,
is_admin=is_admin,
read_only=read_only,
show_deleted=show_deleted,
request_id=request_id)
def to_dict(self):
value = super(RequestContext, self).to_dict()
value.update({'auth_token': self.auth_token,