summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristi Nikolla <knikolla@bu.edu>2017-10-27 10:25:52 -0400
committerKristi Nikolla <knikolla@bu.edu>2018-02-16 21:47:46 +0000
commit5c42bde257f4abb35ff71a123daf13f71e00bd0a (patch)
treeaa5cffb19a755229ae30774d5b58b224cc49ac42
parent03c0ccbbc2725f50f5385c015d01ca1acc958c05 (diff)
Remove hack for lack of service type
Notes
Notes (review): Code-Review+2: Kristi Nikolla <knikolla@bu.edu> Workflow+1: Kristi Nikolla <knikolla@bu.edu> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 23 Feb 2018 21:25:00 +0000 Reviewed-on: https://review.openstack.org/515722 Project: openstack/mixmatch Branch: refs/heads/master
-rw-r--r--mixmatch/proxy.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/mixmatch/proxy.py b/mixmatch/proxy.py
index 856ac7b..e1e04c1 100644
--- a/mixmatch/proxy.py
+++ b/mixmatch/proxy.py
@@ -40,16 +40,11 @@ def stream_response(response):
40 40
41def get_service(a): 41def get_service(a):
42 """Determine service type based on path.""" 42 """Determine service type based on path."""
43 # NOTE(knikolla): Workaround to fix glance requests that do not 43 service = a.pop(0)
44 # contain image as the first part of the path. 44 if service in ['image', 'volume', 'network']:
45 if a[0] in ['v1', 'v2']: 45 return service
46 return 'image'
47 else: 46 else:
48 service = a.pop(0) 47 abort(404)
49 if service in ['image', 'volume', 'network']:
50 return service
51 else:
52 abort(404)
53 48
54 49
55def is_json_response(response): 50def is_json_response(response):