diff options
Diffstat (limited to 'testcases/VIM')
4 files changed, 14 insertions, 14 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index bff71f4e0..c5cfb07a8 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -23,7 +23,6 @@ import argparse import logging import os -import sys import time import yaml @@ -32,6 +31,8 @@ from neutronclient.v2_0 import client as neutronclient from keystoneclient.v2_0 import client as keystoneclient from cinderclient import client as cinderclient +import openstack_utils + parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") args = parser.parse_args() @@ -53,8 +54,6 @@ ch.setFormatter(formatter) logger.addHandler(ch) REPO_PATH = os.environ['repos_dir'] + '/functest/' -sys.path.append(REPO_PATH + "testcases/") -import openstack_utils DEFAULTS_FILE = '/home/opnfv/functest/conf/os_defaults.yaml' diff --git a/testcases/VIM/OpenStack/CI/libraries/generate_defaults.py b/testcases/VIM/OpenStack/CI/libraries/generate_defaults.py index e67e4deec..5e799e4c9 100644 --- a/testcases/VIM/OpenStack/CI/libraries/generate_defaults.py +++ b/testcases/VIM/OpenStack/CI/libraries/generate_defaults.py @@ -23,7 +23,6 @@ import argparse import logging import os -import sys import yaml from novaclient import client as novaclient @@ -31,6 +30,8 @@ from neutronclient.v2_0 import client as neutronclient from keystoneclient.v2_0 import client as keystoneclient from cinderclient import client as cinderclient +import openstack_utils + parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") args = parser.parse_args() @@ -55,8 +56,7 @@ REPO_PATH = os.environ['repos_dir'] + '/functest/' if not os.path.exists(REPO_PATH): logger.error("Functest repository directory not found '%s'" % REPO_PATH) exit(-1) -sys.path.append(REPO_PATH + "testcases/") -import openstack_utils + DEFAULTS_FILE = '/home/opnfv/functest/conf/os_defaults.yaml' diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index 3ac3d4490..6e625ce51 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -21,7 +21,6 @@ import os import re import requests import subprocess -import sys import time import yaml @@ -31,6 +30,9 @@ from keystoneclient.v2_0 import client as keystoneclient from neutronclient.v2_0 import client as neutronclient from cinderclient import client as cinderclient +import functest_utils +import openstack_utils + """ tests configuration """ tests = ['authenticate', 'glance', 'cinder', 'heat', 'keystone', 'neutron', 'nova', 'quotas', 'requests', 'vm', 'all'] @@ -87,9 +89,7 @@ REPO_PATH = os.environ['repos_dir'] + '/functest/' if not os.path.exists(REPO_PATH): logger.error("Functest repository directory not found '%s'" % REPO_PATH) exit(-1) -sys.path.append(REPO_PATH + "testcases/") -import functest_utils -import openstack_utils + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index 951210ce9..9d8b7be8b 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -21,12 +21,15 @@ import re import requests import shutil import subprocess -import sys import time import yaml + import keystoneclient.v2_0.client as ksclient from neutronclient.v2_0 import client as neutronclient +import functest_utils +import openstack_utils + modes = ['full', 'smoke', 'baremetal', 'compute', 'data_processing', 'identity', 'image', 'network', 'object_storage', 'orchestration', 'telemetry', 'volume', 'custom', 'defcore'] @@ -67,9 +70,7 @@ ch.setFormatter(formatter) logger.addHandler(ch) REPO_PATH = os.environ['repos_dir'] + '/functest/' -sys.path.append(REPO_PATH + "testcases/") -import functest_utils -import openstack_utils + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) |