aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-03-28 20:38:15 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-04-04 10:26:22 +0200
commit457321c2c8ed7e8dcb1daccb6d2fd9814e6a98ca (patch)
tree47a5ab66f98eed8fb238a7fffc6788436771bef7 /functest/opnfv_tests/openstack
parent62661e25ab10f1fea79b8c1e19c6d493b3e12b68 (diff)
Add case_name as constructor arg
It allows managing multiple TestCase names with only one TestCase module. It is mainly required by odl which implements: - odl, - odl_netvirt, - fds. It also renames case to case_name in Features to conform with TestCases. JIRA: FUNCTEST-762 Change-Id: Ie254f754a0ea3077a8afda1c470528d38c79478f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py4
-rwxr-xr-xfunctest/opnfv_tests/openstack/refstack_client/refstack_client.py9
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py34
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_base.py4
-rwxr-xr-xfunctest/opnfv_tests/openstack/vping/vping_ssh.py5
-rwxr-xr-xfunctest/opnfv_tests/openstack/vping/vping_userdata.py5
6 files changed, 26 insertions, 35 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 8c6abc15..1fe6143e 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -56,8 +56,8 @@ class RallyBase(testcase.TestCase):
RALLY_PRIVATE_SUBNET_CIDR = CONST.rally_subnet_cidr
RALLY_ROUTER_NAME = CONST.rally_router_name
- def __init__(self):
- super(RallyBase, self).__init__()
+ def __init__(self, case_name=''):
+ super(RallyBase, self).__init__(case_name)
self.mode = ''
self.summary = []
self.scenario_dir = ''
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 37aa9e39..2d04869a 100755
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -25,9 +25,8 @@ logger = ft_logger.Logger("refstack_defcore").getLogger()
class RefstackClient(testcase.TestCase):
- def __init__(self):
- super(RefstackClient, self).__init__()
- self.case_name = "refstack_defcore"
+ def __init__(self, case_name="refstack_defcore"):
+ super(RefstackClient, self).__init__(case_name)
self.FUNCTEST_TEST = CONST.dir_functest_test
self.CONF_PATH = CONST.refstack_tempest_conf_path
self.DEFCORE_LIST = CONST.refstack_defcore_list
@@ -194,8 +193,8 @@ class RefstackClient(testcase.TestCase):
class RefstackClientParser(testcase.TestCase):
- def __init__(self):
- super(RefstackClientParser, self).__init__()
+ def __init__(self, case_name=''):
+ super(RefstackClientParser, self).__init__(case_name)
self.FUNCTEST_TEST = CONST.dir_functest_test
self.CONF_PATH = CONST.refstack_tempest_conf_path
self.DEFCORE_LIST = CONST.refstack_defcore_list
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 0addbd17..c3184e35 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -28,8 +28,8 @@ logger = ft_logger.Logger("Tempest").getLogger()
class TempestCommon(testcase.TestCase):
- def __init__(self):
- super(TempestCommon, self).__init__()
+ def __init__(self, case_name=''):
+ super(TempestCommon, self).__init__(case_name)
self.MODE = ""
self.OPTION = ""
self.VERIFIER_ID = conf_utils.get_verifier_id()
@@ -234,35 +234,31 @@ class TempestCommon(testcase.TestCase):
class TempestSmokeSerial(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "tempest_smoke_serial"
+ def __init__(self, case_name='tempest_smoke_serial'):
+ TempestCommon.__init__(self, case_name)
self.MODE = "smoke"
self.OPTION = "--concurrency 1"
class TempestSmokeParallel(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "tempest_smoke_parallel"
+ def __init__(self, case_name='tempest_smoke_parallel'):
+ TempestCommon.__init__(self, case_name)
self.MODE = "smoke"
self.OPTION = ""
class TempestFullParallel(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "tempest_full_parallel"
+ def __init__(self, case_name="tempest_full_parallel"):
+ TempestCommon.__init__(self, case_name)
self.MODE = "full"
class TempestMultisite(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "multisite"
+ def __init__(self, case_name="multisite"):
+ TempestCommon.__init__(self, case_name)
self.MODE = "feature_multisite"
self.OPTION = "--concurrency 1"
conf_utils.install_verifier_ext(CONST.dir_repo_kingbird)
@@ -270,17 +266,15 @@ class TempestMultisite(TempestCommon):
class TempestCustom(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "tempest_custom"
+ def __init__(self, case_name="tempest_custom"):
+ TempestCommon.__init__(self, case_name)
self.MODE = "custom"
self.OPTION = "--concurrency 1"
class TempestDefcore(TempestCommon):
- def __init__(self):
- TempestCommon.__init__(self)
- self.case_name = "tempest_defcore"
+ def __init__(self, case_name="tempest_defcore"):
+ TempestCommon.__init__(self, case_name)
self.MODE = "defcore"
self.OPTION = "--concurrency 1"
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py
index 584ded38..64cb0004 100644
--- a/functest/opnfv_tests/openstack/vping/vping_base.py
+++ b/functest/opnfv_tests/openstack/vping/vping_base.py
@@ -18,8 +18,8 @@ from functest.utils.constants import CONST
class VPingBase(testcase.TestCase):
- def __init__(self):
- super(VPingBase, self).__init__()
+ def __init__(self, case_name=''):
+ super(VPingBase, self).__init__(case_name)
self.logger = None
self.functest_repo = CONST.dir_repo_functest
self.repo = CONST.dir_vping
diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py
index fc2f01c6..a68b0ff7 100755
--- a/functest/opnfv_tests/openstack/vping/vping_ssh.py
+++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py
@@ -24,9 +24,8 @@ import functest.core.testcase as testcase
class VPingSSH(vping_base.VPingBase):
- def __init__(self):
- super(VPingSSH, self).__init__()
- self.case_name = 'vping_ssh'
+ def __init__(self, case_name='vping_ssh'):
+ super(VPingSSH, self).__init__(case_name)
self.logger = ft_logger.Logger(self.case_name).getLogger()
def do_vping(self, vm, test_ip):
diff --git a/functest/opnfv_tests/openstack/vping/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py
index fa91c12a..e9b86998 100755
--- a/functest/opnfv_tests/openstack/vping/vping_userdata.py
+++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py
@@ -18,9 +18,8 @@ import vping_base
class VPingUserdata(vping_base.VPingBase):
- def __init__(self):
- super(VPingUserdata, self).__init__()
- self.case_name = 'vping_userdata'
+ def __init__(self, case_name='vping_userdata'):
+ super(VPingUserdata, self).__init__(case_name)
self.logger = ft_logger.Logger(self.case_name).getLogger()
def boot_vm_preparation(self, config, vmname, test_ip):