Replace deprecated arguments of RequestContext
The following arguments of the RequestContext class are deprecated since oslo.context 2.18[1]. user : renamed to user_id tenant : renamed to project_id domain : renamed to domain_id user_domain : renamed to user_domain_id project_domain: renamed to project_domain_id This change updates arguments used accordingly. [1] d78cf592e1e3e7aa0fc99bfdd655e82f5c44dfe3 Change-Id: I24a8963d112a24674ad5699685118d019ef1ed56
This commit is contained in:
parent
55bb2564ac
commit
e82c4ca08b
@ -75,8 +75,8 @@ def _loop():
|
|||||||
# security context.
|
# security context.
|
||||||
auth_ctx.set_ctx(
|
auth_ctx.set_ctx(
|
||||||
auth_ctx.MistralContext(
|
auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=None,
|
project_id=None,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
|
@ -66,8 +66,8 @@ def _loop():
|
|||||||
# security context.
|
# security context.
|
||||||
auth_ctx.set_ctx(
|
auth_ctx.set_ctx(
|
||||||
auth_ctx.MistralContext(
|
auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=None,
|
project_id=None,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
|
@ -92,8 +92,8 @@ def _delete(executions):
|
|||||||
# TODO(tuan_luong): Manipulation with auth_ctx should be
|
# TODO(tuan_luong): Manipulation with auth_ctx should be
|
||||||
# out of db transaction scope.
|
# out of db transaction scope.
|
||||||
ctx = auth_ctx.MistralContext(
|
ctx = auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=execution.project_id,
|
project_id=execution.project_id,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
@ -147,8 +147,8 @@ def setup():
|
|||||||
_check_ignored_states_config()
|
_check_ignored_states_config()
|
||||||
|
|
||||||
ctx = auth_ctx.MistralContext(
|
ctx = auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=None,
|
project_id=None,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
|
@ -157,8 +157,8 @@ def setup():
|
|||||||
pt = MistralPeriodicTasks(CONF)
|
pt = MistralPeriodicTasks(CONF)
|
||||||
|
|
||||||
ctx = auth_ctx.MistralContext(
|
ctx = auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=None,
|
project_id=None,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
|
@ -73,16 +73,16 @@ def create_context(trust_id, project_id):
|
|||||||
user_id = client.user_id
|
user_id = client.user_id
|
||||||
|
|
||||||
return auth_ctx.MistralContext(
|
return auth_ctx.MistralContext(
|
||||||
user=user_id,
|
user_id=user_id,
|
||||||
tenant=project_id,
|
project_id=project_id,
|
||||||
auth_token=token,
|
auth_token=token,
|
||||||
is_trust_scoped=True,
|
is_trust_scoped=True,
|
||||||
trust_id=trust_id,
|
trust_id=trust_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
return auth_ctx.MistralContext(
|
return auth_ctx.MistralContext(
|
||||||
user=None,
|
user_id=None,
|
||||||
tenant=None,
|
project_id=None,
|
||||||
auth_token=None,
|
auth_token=None,
|
||||||
is_admin=True
|
is_admin=True
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user