Fix schema of list hypervisors API
Nova "list hypervisors" API returns like the following response which
includes "status" and "state",
{
"hypervisors": [
{
"status": "enabled",
"state": "up",
"id": 1,
"hypervisor_hostname": "devstack-trusty-948085"
}
]
}
but its schema doesn't contain them.
So this patch adds them into the schema.
Change-Id: Ibfd905b8df10e5ff737f0f00a96de989a24c98aa
diff --git a/tempest/api_schema/response/compute/hypervisors.py b/tempest/api_schema/response/compute/hypervisors.py
index e9e1bc9..273b579 100644
--- a/tempest/api_schema/response/compute/hypervisors.py
+++ b/tempest/api_schema/response/compute/hypervisors.py
@@ -160,9 +160,14 @@
'items': {
'type': 'object',
'properties': {
+ 'status': {'type': 'string'},
+ 'state': {'type': 'string'},
'id': {'type': ['integer', 'string']},
'hypervisor_hostname': {'type': 'string'}
},
+ # NOTE: When loading os-hypervisor-status extension,
+ # a response contains status and state. So these params
+ # should not be required.
'required': ['id', 'hypervisor_hostname']
}
}