diff options
Diffstat (limited to 'functest/opnfv_tests')
-rwxr-xr-x | functest/opnfv_tests/features/domino.py | 15 | ||||
-rw-r--r-- | functest/opnfv_tests/features/sdnvpn.py | 14 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/__init__.py (renamed from functest/opnfv_tests/Controllers/ODL/__init__.py) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/examples/create_instance_and_ip.py (renamed from functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/healthcheck/healthcheck.sh (renamed from functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/blacklist.txt (renamed from functest/opnfv_tests/OpenStack/rally/blacklist.txt) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/macro/macro.yaml (renamed from functest/opnfv_tests/OpenStack/rally/macro/macro.yaml) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/rally/run_rally-cert.py (renamed from functest/opnfv_tests/OpenStack/rally/run_rally-cert.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/full/opnfv-heat.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/full/opnfv-neutron.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-authenticate.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-glance.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-keystone.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-heat.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-neutron.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml (renamed from functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh (renamed from functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/autoscaling_policy.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/default.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/random_strings.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/resource_group.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/server_with_ports.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/server_with_volume.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_add.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_delete.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_replace.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_increase.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_reduce.yaml.template (renamed from functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/rally/task.yaml (renamed from functest/opnfv_tests/OpenStack/rally/task.yaml) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt (renamed from functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt (renamed from functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py (renamed from functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/tempest/run_tempest.py (renamed from functest/opnfv_tests/OpenStack/tempest/run_tempest.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/__init__.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/vping/ping.sh (renamed from functest/opnfv_tests/OpenStack/vPing/ping.sh) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_base.py (renamed from functest/opnfv_tests/OpenStack/vPing/vping_base.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_ssh.py (renamed from functest/opnfv_tests/OpenStack/vPing/vping_ssh.py) | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_userdata.py (renamed from functest/opnfv_tests/OpenStack/vPing/vping_userdata.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/__init__.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/odl/__init__.py (renamed from functest/opnfv_tests/Controllers/__init__.py) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/sdn/odl/odl.py (renamed from functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py) | 9 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/sfc/README.md (renamed from functest/opnfv_tests/Controllers/ONOS/Sfc/README.md) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/sdn/onos/sfc/sfc.py (renamed from functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py) | 4 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py (renamed from functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py) | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/Readme.txt (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/__init__.py (renamed from functest/opnfv_tests/OpenStack/__init__.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/__init__.py (renamed from functest/opnfv_tests/OpenStack/vPing/__init__.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/client.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py) | 8 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/connection.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py) | 8 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/environment.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py) | 8 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py) | 4 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/dependencies/onos (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/log/gitignore (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/sdn/onos/teston/onos.py (renamed from functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/__init__.py | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/clearwater.py (renamed from functest/opnfv_tests/vnf/vIMS/clearwater.py) | 2 | ||||
-rwxr-xr-x | functest/opnfv_tests/vnf/ims/create_venv.sh (renamed from functest/opnfv_tests/vnf/vIMS/create_venv.sh) | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/orchestrator.py (renamed from functest/opnfv_tests/vnf/vIMS/orchestrator.py) | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/requirements.pip (renamed from functest/opnfv_tests/vnf/vIMS/requirements.pip) | 0 | ||||
-rwxr-xr-x | functest/opnfv_tests/vnf/ims/vims.py (renamed from functest/opnfv_tests/vnf/vIMS/vIMS.py) | 10 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/rnc/__init__.py | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/rnc/parser.py | 79 | ||||
-rwxr-xr-x | functest/opnfv_tests/vnf/vRNC/parser.py | 70 |
70 files changed, 125 insertions, 112 deletions
diff --git a/functest/opnfv_tests/features/domino.py b/functest/opnfv_tests/features/domino.py index 2deeb4c4..942b474f 100755 --- a/functest/opnfv_tests/features/domino.py +++ b/functest/opnfv_tests/features/domino.py @@ -15,6 +15,7 @@ # 0.4: refactoring to match Test abstraction class import argparse +import os import sys import time @@ -24,19 +25,19 @@ import functest.utils.functest_utils as ft_utils import functest.utils.functest_constants as ft_constants -class DominoCases(TestCasesBase.TestCasesBase): - DOMINO_REPO = ft_constants.DOMINO_REPO - RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR +class DominoTests(TestCasesBase.TestCasesBase): logger = ft_logger.Logger("domino").getLogger() def __init__(self): - super(DominoCases, self).__init__() + super(DominoTests, self).__init__() self.project_name = "domino" self.case_name = "domino-multinode" def main(self, **kwargs): - cmd = 'cd %s && ./tests/run_multinode.sh' % self.DOMINO_REPO - log_file = self.RESULTS_DIR + "/domino.log" + cmd = ('cd %s && ./tests/run_multinode.sh' % + ft_constants.DOMINO_REPO_DIR) + log_file = os.path.join( + ft_constants.FUNCTEST_RESULTS_DIR, "domino.log") start_time = time.time() ret = ft_utils.execute_command(cmd, @@ -72,7 +73,7 @@ if __name__ == '__main__': help="Create json result file", action="store_true") args = vars(parser.parse_args()) - domino = DominoCases() + domino = DominoTests() try: result = domino.main(**args) if result != TestCasesBase.TestCasesBase.EX_OK: diff --git a/functest/opnfv_tests/features/sdnvpn.py b/functest/opnfv_tests/features/sdnvpn.py index efc67b09..567b5fbc 100644 --- a/functest/opnfv_tests/features/sdnvpn.py +++ b/functest/opnfv_tests/features/sdnvpn.py @@ -20,21 +20,21 @@ import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils -class SDNVPN(TestCasesBase.TestCasesBase): - SDNVPN_REPO = ft_constants.SDNVPN_REPO_DIR - SDNVPN_REPO_TESTS = os.path.join(SDNVPN_REPO, "tests/functest") - RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR +class SdnVpnTests(TestCasesBase.TestCasesBase): + SDNVPN_REPO_TESTS = os.path.join( + ft_constants.SDNVPN_REPO_DIR, "tests/functest") logger = ft_logger.Logger("sdnvpn").getLogger() def __init__(self): - super(SDNVPN, self).__init__() + super(SdnVpnTests, self).__init__() self.project_name = "sdnvpn" self.case_name = "bgpvpn" def main(self, **kwargs): os.chdir(self.SDNVPN_REPO_TESTS) cmd = 'run_tests.py' - log_file = os.path.join(self.RESULTS_DIR, "sdnvpn.log") + log_file = os.path.join( + ft_constants.FUNCTEST_RESULTS_DIR, "sdnvpn.log") start_time = time.time() ret = ft_utils.execute_command(cmd, @@ -69,7 +69,7 @@ if __name__ == '__main__': help="Create json result file", action="store_true") args = vars(parser.parse_args()) - sdnvpn = SDNVPN() + sdnvpn = SdnVpnTests() try: result = sdnvpn.main(**args) if result != TestCasesBase.TestCasesBase.EX_OK: diff --git a/functest/opnfv_tests/Controllers/ODL/__init__.py b/functest/opnfv_tests/openstack/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/Controllers/ODL/__init__.py +++ b/functest/opnfv_tests/openstack/__init__.py diff --git a/functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py b/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py index 6a2abe60..6a2abe60 100755 --- a/functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py +++ b/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py diff --git a/functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh index e27cf4b4..e27cf4b4 100755 --- a/functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh +++ b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh diff --git a/functest/opnfv_tests/OpenStack/rally/blacklist.txt b/functest/opnfv_tests/openstack/rally/blacklist.txt index 3a17fa61..3a17fa61 100644 --- a/functest/opnfv_tests/OpenStack/rally/blacklist.txt +++ b/functest/opnfv_tests/openstack/rally/blacklist.txt diff --git a/functest/opnfv_tests/OpenStack/rally/macro/macro.yaml b/functest/opnfv_tests/openstack/rally/macro/macro.yaml index 48c0333e..48c0333e 100644 --- a/functest/opnfv_tests/OpenStack/rally/macro/macro.yaml +++ b/functest/opnfv_tests/openstack/rally/macro/macro.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/run_rally-cert.py b/functest/opnfv_tests/openstack/rally/run_rally-cert.py index 6d8f0160..6d8f0160 100755 --- a/functest/opnfv_tests/OpenStack/rally/run_rally-cert.py +++ b/functest/opnfv_tests/openstack/rally/run_rally-cert.py diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml index e844e33f..e844e33f 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-heat.yaml index 6f3a5c16..6f3a5c16 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-heat.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-neutron.yaml index 0a773533..0a773533 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-neutron.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml index d7622093..d7622093 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-authenticate.yaml index a04e4c1c..a04e4c1c 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-authenticate.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-glance.yaml index 3a67e745..3a67e745 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-glance.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-keystone.yaml index bfc9948b..bfc9948b 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-keystone.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml index a0682acc..a0682acc 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml index 16136978..16136978 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-requests.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml index 74f50992..74f50992 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml index 5962b1db..5962b1db 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-heat.yaml index dc34cc3f..dc34cc3f 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-heat.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-neutron.yaml index 159f2b63..159f2b63 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-neutron.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml index e2795cf7..e2795cf7 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh b/functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh index e3bf2340..e3bf2340 100755 --- a/functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh +++ b/functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/autoscaling_policy.yaml.template index a22487e3..a22487e3 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/autoscaling_policy.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/default.yaml.template index eb4f2f2d..eb4f2f2d 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/default.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/random_strings.yaml.template index 2dd676c1..2dd676c1 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/random_strings.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/resource_group.yaml.template index b3f505fa..b3f505fa 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/resource_group.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/server_with_ports.yaml.template index 909f45d2..909f45d2 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/server_with_ports.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/server_with_volume.yaml.template index 826ca9da..826ca9da 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/server_with_volume.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template index cf34879c..cf34879c 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_add.yaml.template index e06d42e0..e06d42e0 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_add.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_delete.yaml.template index d02593e3..d02593e3 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_delete.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_replace.yaml.template index 46d8bff4..46d8bff4 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_random_strings_replace.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_increase.yaml.template index 891074eb..891074eb 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_increase.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_reduce.yaml.template index b4d1d173..b4d1d173 100644 --- a/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template +++ b/functest/opnfv_tests/openstack/rally/scenario/templates/updated_resource_group_reduce.yaml.template diff --git a/functest/opnfv_tests/OpenStack/rally/task.yaml b/functest/opnfv_tests/openstack/rally/task.yaml index c482f120..c482f120 100644 --- a/functest/opnfv_tests/OpenStack/rally/task.yaml +++ b/functest/opnfv_tests/openstack/rally/task.yaml diff --git a/functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt index 5c8581f6..5c8581f6 100644 --- a/functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt diff --git a/functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt b/functest/opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt index bb1d172d..bb1d172d 100644 --- a/functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/defcore_req.txt diff --git a/functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py b/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py index 8e298d36..8e298d36 100755 --- a/functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py +++ b/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py diff --git a/functest/opnfv_tests/OpenStack/tempest/run_tempest.py b/functest/opnfv_tests/openstack/tempest/run_tempest.py index cbf92c1f..cbf92c1f 100755 --- a/functest/opnfv_tests/OpenStack/tempest/run_tempest.py +++ b/functest/opnfv_tests/openstack/tempest/run_tempest.py diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py b/functest/opnfv_tests/openstack/vping/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py +++ b/functest/opnfv_tests/openstack/vping/__init__.py diff --git a/functest/opnfv_tests/OpenStack/vPing/ping.sh b/functest/opnfv_tests/openstack/vping/ping.sh index 693b8682..693b8682 100755 --- a/functest/opnfv_tests/OpenStack/vPing/ping.sh +++ b/functest/opnfv_tests/openstack/vping/ping.sh diff --git a/functest/opnfv_tests/OpenStack/vPing/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index 7d56e9da..7d56e9da 100644 --- a/functest/opnfv_tests/OpenStack/vPing/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py diff --git a/functest/opnfv_tests/OpenStack/vPing/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py index 6fb35a7a..513ad0ee 100644 --- a/functest/opnfv_tests/OpenStack/vPing/vping_ssh.py +++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py @@ -120,7 +120,7 @@ class VPingSSH(vping_base.VPingBase): self.logger.info("Trying to transfer ping.sh to %s..." % floatip) scp = SCPClient(ssh.get_transport()) - ping_script = os.path.join(self.repo + "ping.sh") + ping_script = os.path.join(self.repo, "ping.sh") try: scp.put(ping_script, "~/") except: diff --git a/functest/opnfv_tests/OpenStack/vPing/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py index fa91c12a..fa91c12a 100644 --- a/functest/opnfv_tests/OpenStack/vPing/vping_userdata.py +++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py b/functest/opnfv_tests/sdn/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py +++ b/functest/opnfv_tests/sdn/__init__.py diff --git a/functest/opnfv_tests/Controllers/__init__.py b/functest/opnfv_tests/sdn/odl/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/Controllers/__init__.py +++ b/functest/opnfv_tests/sdn/odl/__init__.py diff --git a/functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py b/functest/opnfv_tests/sdn/odl/odl.py index 0ddb58cd..c3fcb241 100755 --- a/functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -47,7 +47,7 @@ class ODLResultVisitor(ResultVisitor): return self._data -class ODLTestCases(TestCasesBase.TestCasesBase): +class ODLTests(TestCasesBase.TestCasesBase): repos = ft_constants.REPOS_DIR odl_test_repo = os.path.join(repos, "odl_test") @@ -89,6 +89,7 @@ class ODLTestCases(TestCasesBase.TestCasesBase): self.details = {} self.details['description'] = result.suite.name self.details['tests'] = visitor.get_data() + return self.criteria def main(self, **kwargs): dirs = [self.basic_suite_dir, self.neutron_suite_dir] @@ -127,8 +128,10 @@ class ODLTestCases(TestCasesBase.TestCasesBase): self.logger.info("\n" + stdout.read()) self.logger.info("ODL results were successfully generated") try: - self.parse_results() + test_res = self.parse_results() self.logger.info("ODL results were successfully parsed") + if test_res is not "PASS": + return self.EX_RUN_ERROR except RobotError as e: self.logger.error("Run tests before publishing: %s" % e.message) @@ -227,7 +230,7 @@ if __name__ == '__main__': action='store_true') args = vars(parser.parse_args()) - odl = ODLTestCases() + odl = ODLTests() try: result = odl.main(**args) if result != TestCasesBase.TestCasesBase.EX_OK: diff --git a/functest/opnfv_tests/Controllers/ONOS/Sfc/README.md b/functest/opnfv_tests/sdn/onos/sfc/README.md index ae63ee21..ae63ee21 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Sfc/README.md +++ b/functest/opnfv_tests/sdn/onos/sfc/README.md diff --git a/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py b/functest/opnfv_tests/sdn/onos/sfc/sfc.py index e3f08041..22412270 100755 --- a/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py +++ b/functest/opnfv_tests/sdn/onos/sfc/sfc.py @@ -26,10 +26,10 @@ import time import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils -from Sfc_fun import Sfc_fun +from sfc_onos import SfcOnos logger = ft_logger.Logger("sfc").getLogger() -Sfc_obj = Sfc_fun() +Sfc_obj = SfcOnos() OK = 200 CREATED = 201 diff --git a/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py index 69e076d0..78bf6f4b 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py +++ b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py @@ -16,7 +16,7 @@ ACCEPTED = 202 NO_CONTENT = 204 -class Sfc_fun: +class SfcOnos: """Defines all the def function of SFC.""" def __init__(self): diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt b/functest/opnfv_tests/sdn/onos/teston/Readme.txt index 7393f59a..7393f59a 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt +++ b/functest/opnfv_tests/sdn/onos/teston/Readme.txt diff --git a/functest/opnfv_tests/OpenStack/__init__.py b/functest/opnfv_tests/sdn/onos/teston/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/OpenStack/__init__.py +++ b/functest/opnfv_tests/sdn/onos/teston/__init__.py diff --git a/functest/opnfv_tests/OpenStack/vPing/__init__.py b/functest/opnfv_tests/sdn/onos/teston/adapters/__init__.py index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/OpenStack/vPing/__init__.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/__init__.py diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py b/functest/opnfv_tests/sdn/onos/teston/adapters/client.py index 6b3285e5..81d5f7d7 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/client.py @@ -15,17 +15,17 @@ import pexpect import requests import time -from environment import environment +from environment import Environment import functest.utils.functest_logger as ft_logger -class client(environment): +class Client(Environment): logger = ft_logger.Logger("client").getLogger() def __init__(self): - environment.__init__(self) - self.loginfo = environment() + Environment.__init__(self) + self.loginfo = Environment() self.testcase = '' def RunScript(self, handle, testname, timeout=300): diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py b/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py index b2a2e3d8..3786945d 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/connection.py @@ -17,17 +17,17 @@ import os import pexpect import re -from foundation import foundation +from foundation import Foundation import functest.utils.functest_logger as ft_logger -class connection(foundation): +class Connection(Foundation): logger = ft_logger.Logger("connection").getLogger() def __init__(self): - foundation.__init__(self) - self.loginfo = foundation() + Foundation.__init__(self) + self.loginfo = Foundation() def AddKnownHost(self, handle, ipaddr, username, password): """ diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py b/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py index 01f70b85..06d25b9e 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/environment.py @@ -22,17 +22,17 @@ import os import sys import time -from connection import connection +from connection import Connection import functest.utils.functest_logger as ft_logger -class environment(connection): +class Environment(Connection): logger = ft_logger.Logger("environment").getLogger() def __init__(self): - connection.__init__(self) - self.loginfo = connection() + Connection.__init__(self) + self.loginfo = Connection() self.masterhandle = '' self.home = '' diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py index 6f7a40ff..52462b60 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py @@ -21,13 +21,13 @@ import functest.utils.functest_constants as ft_constants import functest.utils.functest_utils as ft_utils -class foundation: +class Foundation: def __init__(self): # currentpath = os.getcwd() currentpath = \ - ft_constants.FUNCTEST_TEST_DIR + '/Controllers/ONOS/Teston/CI' + ft_constants.FUNCTEST_TEST_DIR + '/sdn/onos/teston/ci' self.cipath = currentpath self.logdir = os.path.join(currentpath, 'log') self.workhome = currentpath[0: currentpath.rfind('opnfv_tests') - 1] diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos b/functest/opnfv_tests/sdn/onos/teston/dependencies/onos index bb02fa89..bb02fa89 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos +++ b/functest/opnfv_tests/sdn/onos/teston/dependencies/onos diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore b/functest/opnfv_tests/sdn/onos/teston/log/gitignore index e69de29b..e69de29b 100644 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore +++ b/functest/opnfv_tests/sdn/onos/teston/log/gitignore diff --git a/functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py b/functest/opnfv_tests/sdn/onos/teston/onos.py index 300f56d1..300f56d1 100755 --- a/functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py +++ b/functest/opnfv_tests/sdn/onos/teston/onos.py diff --git a/functest/opnfv_tests/vnf/__init__.py b/functest/opnfv_tests/vnf/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/functest/opnfv_tests/vnf/__init__.py diff --git a/functest/opnfv_tests/vnf/vIMS/clearwater.py b/functest/opnfv_tests/vnf/ims/clearwater.py index 7236f4fb..eb0abacd 100644 --- a/functest/opnfv_tests/vnf/vIMS/clearwater.py +++ b/functest/opnfv_tests/vnf/ims/clearwater.py @@ -12,7 +12,7 @@ ######################################################################## -class clearwater: +class Clearwater: def __init__(self, inputs={}, orchestrator=None, logger=None): self.config = inputs diff --git a/functest/opnfv_tests/vnf/vIMS/create_venv.sh b/functest/opnfv_tests/vnf/ims/create_venv.sh index 575fd177..575fd177 100755 --- a/functest/opnfv_tests/vnf/vIMS/create_venv.sh +++ b/functest/opnfv_tests/vnf/ims/create_venv.sh diff --git a/functest/opnfv_tests/vnf/vIMS/orchestrator.py b/functest/opnfv_tests/vnf/ims/orchestrator.py index 61157a4f..5f84df00 100644 --- a/functest/opnfv_tests/vnf/vIMS/orchestrator.py +++ b/functest/opnfv_tests/vnf/ims/orchestrator.py @@ -21,7 +21,7 @@ from git import Repo import functest.utils.functest_logger as ft_logger -class orchestrator: +class Orchestrator: def __init__(self, testcase_dir, inputs={}): self.testcase_dir = testcase_dir diff --git a/functest/opnfv_tests/vnf/vIMS/requirements.pip b/functest/opnfv_tests/vnf/ims/requirements.pip index ab26f6e0..ab26f6e0 100644 --- a/functest/opnfv_tests/vnf/vIMS/requirements.pip +++ b/functest/opnfv_tests/vnf/ims/requirements.pip diff --git a/functest/opnfv_tests/vnf/vIMS/vIMS.py b/functest/opnfv_tests/vnf/ims/vims.py index 4cc8ce30..fe888b69 100755 --- a/functest/opnfv_tests/vnf/vIMS/vIMS.py +++ b/functest/opnfv_tests/vnf/ims/vims.py @@ -27,8 +27,8 @@ from neutronclient.v2_0 import client as ntclient import functest.utils.functest_logger as ft_logger import functest.utils.functest_utils as ft_utils import functest.utils.openstack_utils as os_utils -from clearwater import clearwater -from orchestrator import orchestrator +from clearwater import Clearwater +from orchestrator import Orchestrator import functest.utils.functest_constants as ft_constants pp = pprint.PrettyPrinter(indent=4) @@ -49,7 +49,7 @@ logger = ft_logger.Logger("vIMS").getLogger() # Cloudify parameters -VIMS_DIR = os.path.join(ft_constants.FUNCTEST_TEST_DIR, 'vnf/vIMS/') +VIMS_DIR = os.path.join(ft_constants.FUNCTEST_TEST_DIR, 'vnf/ims/') VIMS_DATA_DIR = ft_constants.VIMS_DATA_DIR VIMS_TEST_DIR = ft_constants.VIMS_TEST_DIR VIMS_TENANT_NAME = ft_constants.VIMS_TENANT_NAME @@ -328,7 +328,7 @@ def main(): public_auth_url = keystone.service_catalog.url_for( service_type='identity', endpoint_type='publicURL') - cfy = orchestrator(VIMS_DATA_DIR, CFY_INPUTS) + cfy = Orchestrator(VIMS_DATA_DIR, CFY_INPUTS) cfy.set_credentials(username=ks_creds['username'], password=ks_creds[ 'password'], tenant_name=ks_creds['tenant_name'], @@ -413,7 +413,7 @@ def main(): # ############### CLEARWATER INITIALISATION ################ - cw = clearwater(CW_INPUTS, cfy, logger) + cw = Clearwater(CW_INPUTS, cfy, logger) logger.info("Collect flavor id for all clearwater vm") nova = nvclient.Client("2", **nv_creds) diff --git a/functest/opnfv_tests/vnf/rnc/__init__.py b/functest/opnfv_tests/vnf/rnc/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/functest/opnfv_tests/vnf/rnc/__init__.py diff --git a/functest/opnfv_tests/vnf/rnc/parser.py b/functest/opnfv_tests/vnf/rnc/parser.py new file mode 100644 index 00000000..f653220a --- /dev/null +++ b/functest/opnfv_tests/vnf/rnc/parser.py @@ -0,0 +1,79 @@ +#!/usr/bin/python +# +# Copyright 2016 ZTE Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import os +import sys +import time + +import argparse + +import functest.core.TestCasesBase as base +import functest.utils.functest_constants as ft_constants +import functest.utils.functest_logger as ft_logger +import functest.utils.functest_utils as ft_utils + + +class Parser(base.TestCasesBase): + + def __init__(self): + super(Parser, self).__init__() + self.project_name = "parser" + self.case_name = "parser-basics" + self.logger = ft_logger.Logger("parser").getLogger() + self.log_file = os.path.join( + ft_constants.FUNCTEST_RESULTS_DIR, "parser.log") + + def run(self, **kwargs): + cmd = 'cd %s/tests && ./functest_run.sh' % ft_constants.PARSER_REPO_DIR + + self.start_time = time.time() + ret = ft_utils.execute_command(cmd, + info=True, + output_file=self.log_file) + self.stop_time = time.time() + + self.criteria, details = ft_utils.check_test_result(self.project_name, + ret, + self.start_time, + self.stop_time) + + ft_utils.logger_test_results(self.project_name, + self.case_name, + self.criteria, + details) + + return ret + + @staticmethod + def get_conf(parameter): + return ft_utils.get_functest_config(parameter) + + +if __name__ == '__main__': + args_parser = argparse.ArgumentParser() + args_parser.add_argument("-r", "--report", + help="Create json result file", + action="store_true") + args = vars(args_parser.parse_args()) + parser = Parser() + try: + result = parser.run(**args) + if result != base.TestCasesBase.EX_OK: + sys.exit(result) + if args['report']: + sys.exit(parser.push_to_db()) + except Exception: + sys.exit(base.TestCasesBase.EX_RUN_ERROR) diff --git a/functest/opnfv_tests/vnf/vRNC/parser.py b/functest/opnfv_tests/vnf/vRNC/parser.py deleted file mode 100755 index 33d4d50c..00000000 --- a/functest/opnfv_tests/vnf/vRNC/parser.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2016 ZTE Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import argparse -import time - -import functest.utils.functest_logger as ft_logger -import functest.utils.functest_utils as functest_utils -import functest.utils.functest_constants as ft_constants - -parser = argparse.ArgumentParser() -parser.add_argument("-r", "--report", - help="Create json result file", - action="store_true") -args = parser.parse_args() - -PARSER_REPO = ft_constants.PARSER_REPO -RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR - -logger = ft_logger.Logger("parser").getLogger() - - -def main(): - project = 'parser' - case_name = 'parser-basics' - cmd = 'cd %s/tests && ./functest_run.sh' % PARSER_REPO - - start_time = time.time() - log_file = RESULTS_DIR + "/parser.log" - ret = functest_utils.execute_command(cmd, - info=True, - output_file=log_file) - stop_time = time.time() - - status, details = functest_utils.check_test_result(project, - ret, - start_time, - stop_time) - - functest_utils.logger_test_results(project, - case_name, - status, - details) - - if args.report: - logger.debug("Report Parser Results to DB......") - functest_utils.push_results_to_db(project, - case_name, - start_time, - stop_time, - status, - details) - exit(ret) - - -if __name__ == '__main__': - main() |