Verify list_hypervisors_detail Nova V2/V3 API
This patch adds the JSON Schema for response of Nova V2 & V3
list hypervisor detail API and validate the response with added
JSON Schema to block the backward incompatibility change in the future.
The response body of V2 list hypervisor detail API is below:
{
"hypervisors": [
{
"cpu_info": "?",
"current_workload": 0,
"disk_available_least": null,
"host_ip": "%(ip)s",
"free_disk_gb": 1028,
"free_ram_mb": 7680,
"hypervisor_hostname": "fake-mini",
"hypervisor_type": "fake",
"hypervisor_version": 1,
"id": 1,
"local_gb": 1028,
"local_gb_used": 0,
"memory_mb": 8192,
"memory_mb_used": 512,
"running_vms": 0,
"service": {
"host": "%(host_name)s",
"id": 2
},
"vcpus": 1,
"vcpus_used": 0
}
]
}
The response body of V3 list hypervisor detail API is below:
{
"hypervisors": [
{
"cpu_info": "?",
"current_workload": 0,
"disk_available_least": 0,
"host_ip": "%(ip)s",
"free_disk_gb": 1028,
"free_ram_mb": 7680,
"hypervisor_hostname": "fake-mini",
"hypervisor_type": "fake",
"hypervisor_version": 1,
"id": %(hypervisor_id)s,
"local_gb": 1028,
"local_gb_used": 0,
"memory_mb": 8192,
"memory_mb_used": 512,
"running_vms": 0,
"service": {
"host": "%(host_name)s",
"id": 2
},
"vcpus": 1,
"vcpus_used": 0,
"os-pci:pci_stats": []
}
]
}
Partially implements blueprint nova-api-attribute-test
Change-Id: I0815ecf1dc985ba404f636a68dccbbf6be4188d5
4 files changed