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: I815790106e42ca3cb5b8b3cf98b065a27b9a520e
This commit is contained in:
Takashi Kajinami
2021-07-22 22:33:43 +09:00
parent 41c8807534
commit 96a08b8ff9

View File

@@ -28,10 +28,10 @@ from oslo_log import log
def _fake_context():
ctxt = context.RequestContext(user="user",
tenant="tenant",
project_domain="pdomain",
user_domain="udomain",
ctxt = context.RequestContext(user_id="user",
project_id="tenant",
project_domain_id="pdomain",
user_domain_id="udomain",
overwrite=True)
return ctxt