Remove hack for lack of service type
Change-Id: I1fbce415369f8d7ee6edd58299df02ad10d86818
This commit is contained in:
parent
03c0ccbbc2
commit
5c42bde257
|
@ -40,16 +40,11 @@ def stream_response(response):
|
||||||
|
|
||||||
def get_service(a):
|
def get_service(a):
|
||||||
"""Determine service type based on path."""
|
"""Determine service type based on path."""
|
||||||
# NOTE(knikolla): Workaround to fix glance requests that do not
|
service = a.pop(0)
|
||||||
# contain image as the first part of the path.
|
if service in ['image', 'volume', 'network']:
|
||||||
if a[0] in ['v1', 'v2']:
|
return service
|
||||||
return 'image'
|
|
||||||
else:
|
else:
|
||||||
service = a.pop(0)
|
abort(404)
|
||||||
if service in ['image', 'volume', 'network']:
|
|
||||||
return service
|
|
||||||
else:
|
|
||||||
abort(404)
|
|
||||||
|
|
||||||
|
|
||||||
def is_json_response(response):
|
def is_json_response(response):
|
||||||
|
|
Loading…
Reference in New Issue