Code Review
/
functest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Blacklick test_add_subport if OVN
[functest.git]
/
functest
/
core
/
singlevm.py
diff --git
a/functest/core/singlevm.py
b/functest/core/singlevm.py
index
734eb22
..
5ecd482
100644
(file)
--- a/
functest/core/singlevm.py
+++ b/
functest/core/singlevm.py
@@
-256,12
+256,21
@@
class VmReady1(tenantnetwork.TenantNetwork1):
self.__logger.debug(
"Orphan security group %s in use", sec_group.id)
self.__logger.debug(
"Orphan security group %s in use", sec_group.id)
+ def count_hypervisors(self):
+ """Count hypervisors."""
+ if env.get('SKIP_DOWN_HYPERVISORS').lower() == 'false':
+ return len(self.orig_cloud.list_hypervisors())
+ return self.count_active_hypervisors()
+
def count_active_hypervisors(self):
"""Count all hypervisors which are up."""
compute_cnt = 0
for hypervisor in self.orig_cloud.list_hypervisors():
if hypervisor['state'] == 'up':
compute_cnt += 1
def count_active_hypervisors(self):
"""Count all hypervisors which are up."""
compute_cnt = 0
for hypervisor in self.orig_cloud.list_hypervisors():
if hypervisor['state'] == 'up':
compute_cnt += 1
+ else:
+ self.__logger.warning(
+ "%s is down", hypervisor['hypervisor_hostname'])
return compute_cnt
def run(self, **kwargs):
return compute_cnt
def run(self, **kwargs):