diff options
-rw-r--r-- | multivimbroker/multivimbroker/forwarder/views.py | 2 | ||||
-rw-r--r-- | multivimbroker/multivimbroker/pub/utils/syscomm.py | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/forwarder/views.py b/multivimbroker/multivimbroker/forwarder/views.py index 5c7cd0a..19e69f0 100644 --- a/multivimbroker/multivimbroker/forwarder/views.py +++ b/multivimbroker/multivimbroker/forwarder/views.py @@ -233,6 +233,8 @@ class APIv1CheckCapacity(CheckCapacity): continue if not resp_body.get("result", False): continue + azCapInfo = resp_body.get("AZs", []) + vim["AZs"] = azCapInfo ret['VIMs'].append(vim) return Response(data=ret, status=status.HTTP_200_OK) 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 |