summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-08-23 16:43:13 +0000
committerGerrit Code Review <review@openstack.org>2014-08-23 16:43:13 +0000
commit15b7c6a8f9bb2c12058e9447ed29806a3070d378 (patch)
tree632a7adcf3b37d5bda63e0610640f624f620a143
parentcba006107b3fdec740832fd15d40e1b2a12e58c1 (diff)
parent6027a9558c4997cba2eb8ecd93e5cb7138b7510d (diff)
downloadhorizon-15b7c6a8f9bb2c12058e9447ed29806a3070d378.tar.gz
Merge "Check host is not none in each availability zone" into stable/havana
-rw-r--r--openstack_dashboard/dashboards/admin/info/tables.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py
index a123fab4b..1c9f4a14b 100644
--- a/openstack_dashboard/dashboards/admin/info/tables.py
+++ b/openstack_dashboard/dashboards/admin/info/tables.py
@@ -57,8 +57,10 @@ def get_available(zone):
def get_hosts(zone):
hosts = zone.hosts
host_details = []
+ if hosts is None:
+ return []
for name, services in hosts.items():
- up = all([s['active'] and s['available'] for k, s in services.items()])
+ up = all(s['active'] and s['available'] for s in services.values())
up = _("Services Up") if up else _("Services Down")
host_details.append("%(host)s (%(up)s)" % {'host': name, 'up': up})
return host_details