Fix flavor info in server response schema
Nova show flavor info(id and link) in the server representation
but those are not always going to be present.
If flavor data is being deleted from DB after server creation then,
it will return empty dict. But Tempest schema expect a non-empty dict
always.
Fixing doc for that on nova side- I350dc33df0cb03eb86df1f142e58ae34b02a1334
Also we are not loosing any coverage due to relaxing this in schema as tests
does checks the flavor object presence for normal case where flavor should
be present in server representation.
- test_resize_server_confirm
- test_rebuild_server
Change-Id: I274a86112d78c469970b62334a4301b107a75c5a
Closes-Bug: #1677953
diff --git a/tempest/lib/api_schema/response/compute/v2_1/servers.py b/tempest/lib/api_schema/response/compute/v2_1/servers.py
index 4c4b5eb..33a7757 100644
--- a/tempest/lib/api_schema/response/compute/v2_1/servers.py
+++ b/tempest/lib/api_schema/response/compute/v2_1/servers.py
@@ -100,8 +100,10 @@
'id': {'type': 'string'},
'links': parameter_types.links
},
- 'additionalProperties': False,
- 'required': ['id', 'links']
+ # NOTE(gmann): This will be empty object if there is no
+ # flavor info present in DB. This can happen when flavor info is
+ # deleted after server creation.
+ 'additionalProperties': False
},
'fault': {
'type': 'object',