Fix expected response code of show_image_file
According to https://developer.openstack.org/api-ref/image/v2/#download-binary-image-data, normal response codes of interface show_image_file should be [200, 204, 206], this is to fix it. Change-Id: I6eef7231742d873a0e727c300a9ae7f5958ac4f8 Closes-Bug: #1756264
This commit is contained in:
parent
c25801a985
commit
fd5a14b738
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fix show_image_file interface in v2 ImagesClient: Bug#1756264.
|
||||||
|
The expected success code of show_image_file is changed from
|
||||||
|
``200`` to ``[200, 204, 206]``.
|
@ -161,7 +161,7 @@ class ImagesClient(rest_client.RestClient):
|
|||||||
"""
|
"""
|
||||||
url = 'images/%s/file' % image_id
|
url = 'images/%s/file' % image_id
|
||||||
resp, body = self.get(url)
|
resp, body = self.get(url)
|
||||||
self.expected_success(200, resp.status)
|
self.expected_success([200, 204, 206], resp.status)
|
||||||
return rest_client.ResponseBodyData(resp, body)
|
return rest_client.ResponseBodyData(resp, body)
|
||||||
|
|
||||||
def add_image_tag(self, image_id, tag):
|
def add_image_tag(self, image_id, tag):
|
||||||
|
Loading…
Reference in New Issue
Block a user