From 33e2b5a73237418148e21c94b07efe87d200eb7b Mon Sep 17 00:00:00 2001 From: John Warren Date: Wed, 13 Jan 2016 12:01:01 -0500 Subject: [PATCH] Alter image json schema to allow for null name and size values Tests are failing due to images that have null name or size values even though these are valid images that happen to have been created outside of tempest. The API spec indicates that both values can be null: http://developer.openstack.org/api-ref-image-v2.html#listImages-v2 Change-Id: I015bc569ac4dde5d06b5418b98ff29537b7a4b1c Closes-Bug: #1533730 --- tempest_lib/api_schema/response/compute/v2_1/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tempest_lib/api_schema/response/compute/v2_1/images.py b/tempest_lib/api_schema/response/compute/v2_1/images.py index b8c4151..41aceaf 100644 --- a/tempest_lib/api_schema/response/compute/v2_1/images.py +++ b/tempest_lib/api_schema/response/compute/v2_1/images.py @@ -26,7 +26,7 @@ common_image_schema = { 'status': {'type': 'string'}, 'updated': {'type': 'string'}, 'links': image_links, - 'name': {'type': 'string'}, + 'name': {'type': ['string', 'null']}, 'created': {'type': 'string'}, 'minDisk': {'type': 'integer'}, 'minRam': {'type': 'integer'}, @@ -41,7 +41,7 @@ common_image_schema = { 'additionalProperties': False, 'required': ['id', 'links'] }, - 'OS-EXT-IMG-SIZE:size': {'type': 'integer'}, + 'OS-EXT-IMG-SIZE:size': {'type': ['integer', 'null']}, 'OS-DCF:diskConfig': {'type': 'string'} }, 'additionalProperties': False,