diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-04-03 09:06:30 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2019-04-03 09:45:54 +0000 |
commit | d746523f28c7de4feabfd2d9ac56554d37884adc (patch) | |
tree | bdc3df866e57d4198f4f71faa126930fd83dc897 | |
parent | de2f1e42e37b975454af53aeb81a2ae2e7627e99 (diff) |
Pass headers for multi-tenant support
Change-Id: Ibe8aa3818a73d17df30e79ae24cb5d696c47403b
Issue-ID: MULTICLOUD-527
Signed-off-by: Bin Yang <bin.yang@windriver.com>
-rw-r--r-- | multivimbroker/multivimbroker/pub/utils/syscomm.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/pub/utils/syscomm.py b/multivimbroker/multivimbroker/pub/utils/syscomm.py index 7516d4b..7afb966 100644 --- a/multivimbroker/multivimbroker/pub/utils/syscomm.py +++ b/multivimbroker/multivimbroker/pub/utils/syscomm.py @@ -44,6 +44,14 @@ def originHeaders(request): headers[key[5:].replace('_', '-')] = value elif key in ('CONTENT_TYPE', 'CONTENT_LENGTH'): headers[key.replace('_', '-')] = value + elif key.lower() in ('project', 'project_id', 'project_name', + 'tenant', 'tenant_id', 'tenant_name'): + # support API to specify project other than the default one + headers[key] = value + # elif key.lower() in ('x-auth-token', + # 'http_x_auth_token', 'x_auth_token'): + # # pass the token to plugins + # headers["X-Auth-Token"] = value return headers |