diff options
author | ghanshyam <ghanshyam.mann@nectechnologies.in> | 2015-02-25 13:18:40 +0900 |
---|---|---|
committer | Rohan Kanade <rkanade@redhat.com> | 2015-03-10 14:10:25 +0530 |
commit | fa7962a490a62a2c1d3e8b05a053b5ac34c6b0ab (patch) | |
tree | d9ed89c888f52d4c3b1a2eb9d8bb58c9b3b28243 /tempest/api_schema/response | |
parent | 07c44885bc977e2150ade37b09c993797cc20155 (diff) | |
download | tempest-fa7962a490a62a2c1d3e8b05a053b5ac34c6b0ab.tar.gz |
Fix image/server schema for 'OS-DCF:diskConfig'
When disk_config extension is loaded then, rebuild server and
image show/list detail API's response contain 'OS-DCF:diskConfig' attributes.
This patch fix those schemas for that.
Change-Id: Ic24447d05fa8e5d1f4d44661def179d7a9b995f4
Diffstat (limited to 'tempest/api_schema/response')
-rw-r--r-- | tempest/api_schema/response/compute/v2/images.py | 7 | ||||
-rw-r--r-- | tempest/api_schema/response/compute/v2/servers.py | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tempest/api_schema/response/compute/v2/images.py b/tempest/api_schema/response/compute/v2/images.py index 2317e6be6..43dae380b 100644 --- a/tempest/api_schema/response/compute/v2/images.py +++ b/tempest/api_schema/response/compute/v2/images.py @@ -40,11 +40,12 @@ common_image_schema = { }, 'required': ['id', 'links'] }, - 'OS-EXT-IMG-SIZE:size': {'type': 'integer'} + 'OS-EXT-IMG-SIZE:size': {'type': 'integer'}, + 'OS-DCF:diskConfig': {'type': 'string'} }, # 'server' attributes only comes in response body if image is - # associated with any server. 'OS-EXT-IMG-SIZE:size' is API - # extension, So those are not defined as 'required'. + # associated with any server. 'OS-EXT-IMG-SIZE:size' & 'OS-DCF:diskConfig' + # are API extension, So those are not defined as 'required'. 'required': ['id', 'status', 'updated', 'links', 'name', 'created', 'minDisk', 'minRam', 'progress', 'metadata'] diff --git a/tempest/api_schema/response/compute/v2/servers.py b/tempest/api_schema/response/compute/v2/servers.py index 3d1eabecd..c116bf549 100644 --- a/tempest/api_schema/response/compute/v2/servers.py +++ b/tempest/api_schema/response/compute/v2/servers.py @@ -339,8 +339,6 @@ list_servers_detail['response_body']['properties']['servers']['items'][ rebuild_server = copy.deepcopy(update_server) rebuild_server['status_code'] = [202] -del rebuild_server['response_body']['properties']['server'][ - 'properties']['OS-DCF:diskConfig'] rebuild_server_with_admin_pass = copy.deepcopy(rebuild_server) rebuild_server_with_admin_pass['response_body']['properties']['server'][ |