Remove tenant when building mistral context

When building mistral context (using oslo.context) from environment, the
tenant extra key was given, which is not accepted by oslo.context.

This issue was detected when debugging a mistral-client test:
mistralclient.tests.functional.cli.v2.test_cli_v2.NegativeCLITests.test_target_action_execution

Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I72ce8851ea5b379a8af75b32fb600691638836af
This commit is contained in:
Arnaud Morin 2023-01-17 22:41:24 +01:00
parent e75b6b356f
commit 70af40becc
1 changed files with 0 additions and 3 deletions

View File

@ -153,9 +153,6 @@ def _extract_mistral_auth_params(headers):
'insecure': insecure,
'auth_token': headers.get('X-Target-Auth-Token'),
'auth_uri': headers.get('X-Target-Auth-Uri'),
# TODO(tkajinam): Remove this once oslo.context >= 4.0.0 becomes
# avaialble
'tenant': headers.get('X-Target-Project-Id'),
'project_id': headers.get('X-Target-Project-Id'),
'user': headers.get('X-Target-User-Id'),
'user_name': headers.get('X-Target-User-Name'),