diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-11-11 15:35:12 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-11-11 15:37:06 +0100 |
commit | 66b16cde6176ec1d05ca7399a819e1efb7b5f242 (patch) | |
tree | c92a1686e991eca6af550e28730140f54d2eef90 | |
parent | 12b1809f55882d40fce87e9665c66240d8650d65 (diff) |
Check if at least 2 hypervisors (Shaker)
Shaker is now skipped if only one hypervisor.
Change-Id: Ib3f803ab61e66e0daba0622ead0c1bf0905d0cce
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 07a5762fd3e929a50c49785f2e583dba20a0ba4a)
-rw-r--r-- | functest/opnfv_tests/openstack/shaker/shaker.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/shaker/shaker.py b/functest/opnfv_tests/openstack/shaker/shaker.py index 1170fede3..95e10022f 100644 --- a/functest/opnfv_tests/openstack/shaker/shaker.py +++ b/functest/opnfv_tests/openstack/shaker/shaker.py @@ -44,6 +44,12 @@ class Shaker(singlevm.SingleVm2): super(Shaker, self).__init__(**kwargs) self.role = None + def check_requirements(self): + if len(self.orig_cloud.list_hypervisors()) < 2: + self.__logger.warning("Shaker requires at least 2 hypervisors") + self.is_skipped = True + self.project.clean() + def prepare(self): super(Shaker, self).prepare() self.cloud.create_security_group_rule( |