Code Review
/
functest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
aa49985
)
Fix function get_hypervisors in openstack utils
51/16551/1
author
jose.lausuch
<jose.lausuch@ericsson.com>
Thu, 7 Jul 2016 12:23:42 +0000
(14:23 +0200)
committer
jose.lausuch
<jose.lausuch@ericsson.com>
Thu, 7 Jul 2016 12:23:42 +0000
(14:23 +0200)
JIRA: FUNCTEST-99
Change-Id: I23fd3fae08255d36ec158e5a522640615b5d8a10
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
utils/openstack_utils.py
patch
|
blob
|
history
diff --git
a/utils/openstack_utils.py
b/utils/openstack_utils.py
index
fcdce54
..
b463bf4
100644
(file)
--- 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