Add 'disabled_reason' in hypervisor schema
If os-hypervisor-status extension is enabled then,
'disabled_reason' is updated in 'service' dict of hypervisor
show and list detail API' response.
This patch adds 'disabled_reason' in their schema.
Change-Id: I98eb76cede2deeb188e3776a2f94a75f70f59725
diff --git a/tempest/api_schema/response/compute/hypervisors.py b/tempest/api_schema/response/compute/hypervisors.py
index fc3b828..d6f2bd1 100644
--- a/tempest/api_schema/response/compute/hypervisors.py
+++ b/tempest/api_schema/response/compute/hypervisors.py
@@ -80,8 +80,12 @@
'type': 'object',
'properties': {
'host': {'type': 'string'},
- 'id': {'type': ['integer', 'string']}
+ 'id': {'type': ['integer', 'string']},
+ 'disabled_reason': {'type': ['string', 'null']}
},
+ # NOTE(gmann): 'disabled_reason' is updated in
+ # 'service' dict if 'os-hypervisor-status'
+ # extension is loaded. So this is not required.
'required': ['host', 'id']
},
'vcpus': {'type': 'integer'},
@@ -137,8 +141,12 @@
'type': 'object',
'properties': {
'host': {'type': 'string'},
- 'id': {'type': ['integer', 'string']}
+ 'id': {'type': ['integer', 'string']},
+ 'disabled_reason': {'type': ['string', 'null']}
},
+ # NOTE: 'disabled_reason' is updated in 'service'
+ # dict if os-hypervisor-status' extension is loaded.
+ # So this is not required.
'required': ['host', 'id']
},
'vcpus': {'type': 'integer'},