Displaying two different az results to users is confusing, so just return the az that the instance is actually in. Also, cache the result from looking up the az by host for an hour to avoid making lots of expensive db requests. DocImpact Change-Id: Ib39bf94c608874695aab00e61035e64f9594a985
73 lines
2.5 KiB
JSON
73 lines
2.5 KiB
JSON
{
|
|
"servers": [
|
|
{
|
|
"OS-DCF:diskConfig": "AUTO",
|
|
"OS-EXT-AZ:availability_zone": "nova",
|
|
"OS-EXT-SRV-ATTR:host": "33924d68ef4e4214bb9bc200178d23b8",
|
|
"OS-EXT-SRV-ATTR:hypervisor_hostname": "fake-mini",
|
|
"OS-EXT-SRV-ATTR:instance_name": "instance-00000001",
|
|
"OS-EXT-STS:power_state": 1,
|
|
"OS-EXT-STS:task_state": null,
|
|
"OS-EXT-STS:vm_state": "active",
|
|
"accessIPv4": "",
|
|
"accessIPv6": "",
|
|
"addresses": {
|
|
"private": [
|
|
{
|
|
"OS-EXT-IPS:type": "fixed",
|
|
"addr": "192.168.0.3",
|
|
"version": 4
|
|
}
|
|
]
|
|
},
|
|
"config_drive": "",
|
|
"created": "2013-02-07T18:58:56Z",
|
|
"flavor": {
|
|
"id": "1",
|
|
"links": [
|
|
{
|
|
"href": "http://openstack.example.com/openstack/flavors/1",
|
|
"rel": "bookmark"
|
|
}
|
|
]
|
|
},
|
|
"hostId": "e0028a678cb7760fe5987947ab495dbb0f79c1071850f87a9aa8227f",
|
|
"id": "3ec52036-bfee-4869-9c4c-81a579d72196",
|
|
"image": {
|
|
"id": "70a599e0-31e7-49b7-b260-868f441e862b",
|
|
"links": [
|
|
{
|
|
"href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
|
|
"rel": "bookmark"
|
|
}
|
|
]
|
|
},
|
|
"key_name": null,
|
|
"links": [
|
|
{
|
|
"href": "http://openstack.example.com/v2/openstack/servers/3ec52036-bfee-4869-9c4c-81a579d72196",
|
|
"rel": "self"
|
|
},
|
|
{
|
|
"href": "http://openstack.example.com/openstack/servers/3ec52036-bfee-4869-9c4c-81a579d72196",
|
|
"rel": "bookmark"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"My Server Name": "Apache1"
|
|
},
|
|
"name": "new-server-test",
|
|
"progress": 0,
|
|
"security_groups": [
|
|
{
|
|
"name": "default"
|
|
}
|
|
],
|
|
"status": "ACTIVE",
|
|
"tenant_id": "openstack",
|
|
"updated": "2013-02-07T18:58:57Z",
|
|
"user_id": "fake"
|
|
}
|
|
]
|
|
}
|