Pass headers for multi-tenant support 56/84056/2
authorBin Yang <bin.yang@windriver.com>
Wed, 3 Apr 2019 09:06:30 +0000 (09:06 +0000)
committerBin Yang <bin.yang@windriver.com>
Wed, 3 Apr 2019 09:45:54 +0000 (09:45 +0000)
Change-Id: Ibe8aa3818a73d17df30e79ae24cb5d696c47403b
Issue-ID: MULTICLOUD-527
Signed-off-by: Bin Yang <bin.yang@windriver.com>
multivimbroker/multivimbroker/pub/utils/syscomm.py

index 7516d4b..7afb966 100644 (file)
@@ -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
 
 

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use