summaryrefslogtreecommitdiffstats
path: root/utils/openstack_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/openstack_utils.py')
-rw-r--r--utils/openstack_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py
index fcdce5471..b463bf4ae 100644
--- a/utils/openstack_utils.py
+++ b/utils/openstack_utils.py
@@ -183,7 +183,8 @@ def get_hypervisors(nova_client):
nodes = []
hypervisors = nova_client.hypervisors.list()
for hypervisor in hypervisors:
- nodes.append(hypervisor.hypervisor_hostname)
+ if hypervisor.state == "up":
+ nodes.append(hypervisor.hypervisor_hostname)
return nodes
except Exception, e:
print "Error [get_hypervisors(nova_client)]:", e