aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/features
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/features')
-rw-r--r--functest/opnfv_tests/features/barometer.py6
-rw-r--r--functest/opnfv_tests/features/copper.py12
-rw-r--r--functest/opnfv_tests/features/doctor.py12
-rw-r--r--functest/opnfv_tests/features/domino.py12
-rw-r--r--functest/opnfv_tests/features/netready.py16
-rw-r--r--functest/opnfv_tests/features/odl_sfc.py14
-rw-r--r--functest/opnfv_tests/features/promise.py14
-rw-r--r--functest/opnfv_tests/features/sdnvpn.py14
-rw-r--r--functest/opnfv_tests/features/security_scan.py19
9 files changed, 58 insertions, 61 deletions
diff --git a/functest/opnfv_tests/features/barometer.py b/functest/opnfv_tests/features/barometer.py
index 6207f581..b42801d4 100644
--- a/functest/opnfv_tests/features/barometer.py
+++ b/functest/opnfv_tests/features/barometer.py
@@ -16,10 +16,8 @@ class BarometerCollectd(base.Feature):
Class for executing barometercollectd testcase.
'''
- def __init__(self, case_name='barometercollectd'):
- super(BarometerCollectd, self).__init__(project='barometer',
- case_name=case_name,
- repo='dir_repo_barometer')
+ def __init__(self, **kwargs):
+ super(BarometerCollectd, self).__init__(**kwargs)
def execute(self):
return collectd.main(self.logger)
diff --git a/functest/opnfv_tests/features/copper.py b/functest/opnfv_tests/features/copper.py
index 5b88a499..2c5459fc 100644
--- a/functest/opnfv_tests/features/copper.py
+++ b/functest/opnfv_tests/features/copper.py
@@ -15,11 +15,11 @@
# limitations under the License.
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class Copper(base.Feature):
- def __init__(self, case_name='copper-notification'):
- super(Copper, self).__init__(project='copper',
- case_name=case_name,
- repo='dir_repo_copper')
- self.cmd = 'cd %s/tests && bash run.sh && cd -' % self.repo
+class Copper(base.BashFeature):
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_copper')
+ kwargs["cmd"] = 'cd %s/tests && bash run.sh && cd -' % repo
+ super(Copper, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/doctor.py b/functest/opnfv_tests/features/doctor.py
index fd181a04..0e39248d 100644
--- a/functest/opnfv_tests/features/doctor.py
+++ b/functest/opnfv_tests/features/doctor.py
@@ -14,11 +14,11 @@
#
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class Doctor(base.Feature):
- def __init__(self, case_name='doctor-notification'):
- super(Doctor, self).__init__(project='doctor',
- case_name=case_name,
- repo='dir_repo_doctor')
- self.cmd = 'cd %s/tests && ./run.sh' % self.repo
+class Doctor(base.BashFeature):
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_doctor')
+ kwargs["cmd"] = 'cd %s/tests && ./run.sh' % repo
+ super(Doctor, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/domino.py b/functest/opnfv_tests/features/domino.py
index 1c620235..b5def3f3 100644
--- a/functest/opnfv_tests/features/domino.py
+++ b/functest/opnfv_tests/features/domino.py
@@ -15,11 +15,11 @@
# 0.4: refactoring to match Test abstraction class
import functest.core.feature as base
+from functest.utils.constants import CONST
-class Domino(base.Feature):
- def __init__(self, case_name='domino-multinode'):
- super(Domino, self).__init__(project='domino',
- case_name=case_name,
- repo='dir_repo_domino')
- self.cmd = 'cd %s && ./tests/run_multinode.sh' % self.repo
+class Domino(base.BashFeature):
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_domino')
+ kwargs["cmd"] = 'cd %s && ./tests/run_multinode.sh' % repo
+ super(Domino, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/netready.py b/functest/opnfv_tests/features/netready.py
index ada322c1..717a4a34 100644
--- a/functest/opnfv_tests/features/netready.py
+++ b/functest/opnfv_tests/features/netready.py
@@ -9,14 +9,14 @@
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class GluonVping(base.Feature):
+class GluonVping(base.BashFeature):
- def __init__(self, case_name='gluon_vping'):
- super(GluonVping, self).__init__(project='netready',
- case_name=case_name,
- repo='dir_repo_netready')
- dir_netready_functest = '{}/test/functest'.format(self.repo)
- self.cmd = ('cd %s && python ./gluon-test-suite.py' %
- dir_netready_functest)
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_netready')
+ dir_netready_functest = '{}/test/functest'.format(repo)
+ kwargs["cmd"] = ('cd %s && python ./gluon-test-suite.py' %
+ dir_netready_functest)
+ super(GluonVping, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/odl_sfc.py b/functest/opnfv_tests/features/odl_sfc.py
index f96683e3..f5ecf733 100644
--- a/functest/opnfv_tests/features/odl_sfc.py
+++ b/functest/opnfv_tests/features/odl_sfc.py
@@ -8,13 +8,13 @@
# http://www.apache.org/licenses/LICENSE-2.0
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class OpenDaylightSFC(base.Feature):
+class OpenDaylightSFC(base.BashFeature):
- def __init__(self, case_name='functest-odl-sfc'):
- super(OpenDaylightSFC, self).__init__(project='sfc',
- case_name=case_name,
- repo='dir_repo_sfc')
- dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
- self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_sfc')
+ dir_sfc_functest = '{}/sfc/tests/functest'.format(repo)
+ kwargs["cmd"] = 'cd %s && python ./run_tests.py' % dir_sfc_functest
+ super(OpenDaylightSFC, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/promise.py b/functest/opnfv_tests/features/promise.py
index e3dc7fdf..b9e128f0 100644
--- a/functest/opnfv_tests/features/promise.py
+++ b/functest/opnfv_tests/features/promise.py
@@ -13,12 +13,12 @@
# limitations under the License.
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class Promise(base.Feature):
- def __init__(self, case_name='promise'):
- super(Promise, self).__init__(project='promise',
- case_name=case_name,
- repo='dir_repo_promise')
- dir_promise_functest = '{}/promise/test/functest'.format(self.repo)
- self.cmd = 'cd %s && python ./run_tests.py' % dir_promise_functest
+class Promise(base.BashFeature):
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_promise')
+ dir_promise_functest = '{}/promise/test/functest'.format(repo)
+ kwargs["cmd"] = 'cd %s && python ./run_tests.py' % dir_promise_functest
+ super(Promise, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/sdnvpn.py b/functest/opnfv_tests/features/sdnvpn.py
index 5e9254a0..10a97e92 100644
--- a/functest/opnfv_tests/features/sdnvpn.py
+++ b/functest/opnfv_tests/features/sdnvpn.py
@@ -8,13 +8,13 @@
# http://www.apache.org/licenses/LICENSE-2.0
#
import functest.core.feature as base
+from functest.utils.constants import CONST
-class SdnVpnTests(base.Feature):
+class SdnVpnTests(base.BashFeature):
- def __init__(self, case_name='bgpvpn'):
- super(SdnVpnTests, self).__init__(project='sdnvpn',
- case_name=case_name,
- repo='dir_repo_sdnvpn')
- dir_sfc_functest = '{}/sdnvpn/test/functest'.format(self.repo)
- self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_sdnvpn')
+ dir_sfc_functest = '{}/sdnvpn/test/functest'.format(repo)
+ kwargs["cmd"] = 'cd %s && python ./run_tests.py' % dir_sfc_functest
+ super(SdnVpnTests, self).__init__(**kwargs)
diff --git a/functest/opnfv_tests/features/security_scan.py b/functest/opnfv_tests/features/security_scan.py
index e7256380..8f167259 100644
--- a/functest/opnfv_tests/features/security_scan.py
+++ b/functest/opnfv_tests/features/security_scan.py
@@ -12,13 +12,12 @@ import functest.core.feature as base
from functest.utils.constants import CONST
-class SecurityScan(base.Feature):
- def __init__(self, case_name='security_scan'):
- super(SecurityScan, self).__init__(project='securityscanning',
- case_name=case_name,
- repo='dir_repo_securityscan')
- self.cmd = ('. {0}/stackrc && '
- 'cd {1} && '
- 'python security_scan.py --config config.ini && '
- 'cd -'.format(CONST.dir_functest_conf,
- self.repo))
+class SecurityScan(base.BashFeature):
+ def __init__(self, **kwargs):
+ repo = CONST.__getattribute__('dir_repo_securityscan')
+ conf = CONST.__getattribute__('dir_functest_conf')
+ kwargs["cmd"] = ('. {0}/stackrc && '
+ 'cd {1} && '
+ 'python security_scan.py --config config.ini && '
+ 'cd -'.format(conf, repo))
+ super(SecurityScan, self).__init__(**kwargs)