summaryrefslogtreecommitdiffstats
path: root/newton
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-10-27 21:38:47 +0800
committerBin Yang <bin.yang@windriver.com>2017-10-27 21:38:47 +0800
commita9150114496bcf6def3f7f6a5348b2f247b8df4c (patch)
tree22b0c67f82f686e5bd4be930ec08ac37b1fde0ce /newton
parent3b927f98f161e317da2448b19cfc8f00e34b246e (diff)
Workaround APPC dependency on compute v2 API
Change-Id: Ia33e6b2b02e8d7d74b781527dd5e0376ce27aa38 Issue-Id: MULTICLOUD-106 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton')
-rw-r--r--newton/newton/proxy/views/services.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/newton/newton/proxy/views/services.py b/newton/newton/proxy/views/services.py
index 34f39128..19fec9ca 100644
--- a/newton/newton/proxy/views/services.py
+++ b/newton/newton/proxy/views/services.py
@@ -86,6 +86,12 @@ class Services(APIView):
def _do_action(self, action, request, vim_id, servicetype, requri):
tmp_auth_token = self._get_token(request)
try:
+ #special handling of compute/v2 request from APPC, temp solution for A release
+ if servicetype == 'compute':
+ tmp_pattern = re.compile(r'^v2/(.+)')
+ requri = tmp_pattern.sub(r'v2.1/' + r'\1', requri)
+
+
vim = VimDriverUtils.get_vim_info(vim_id)
# fetch the auth_state out of cache
auth_state, metadata_catalog = VimDriverUtils.get_token_cache(tmp_auth_token)