Browse Source

Remove hack for lack of service type

Change-Id: I1fbce415369f8d7ee6edd58299df02ad10d86818
Kristi Nikolla 1 year ago
parent
commit
5c42bde257
1 changed files with 4 additions and 9 deletions
  1. 4
    9
      mixmatch/proxy.py

+ 4
- 9
mixmatch/proxy.py View File

@@ -40,16 +40,11 @@ def stream_response(response):
40 40
 
41 41
 def get_service(a):
42 42
     """Determine service type based on path."""
43
-    # NOTE(knikolla): Workaround to fix glance requests that do not
44
-    # contain image as the first part of the path.
45
-    if a[0] in ['v1', 'v2']:
46
-        return 'image'
43
+    service = a.pop(0)
44
+    if service in ['image', 'volume', 'network']:
45
+        return service
47 46
     else:
48
-        service = a.pop(0)
49
-        if service in ['image', 'volume', 'network']:
50
-            return service
51
-        else:
52
-            abort(404)
47
+        abort(404)
53 48
 
54 49
 
55 50
 def is_json_response(response):

Loading…
Cancel
Save