aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/features')
-rwxr-xr-xtestcases/features/copper.py8
-rwxr-xr-xtestcases/features/doctor.py8
-rwxr-xr-xtestcases/features/domino.py36
-rwxr-xr-xtestcases/features/promise.py54
4 files changed, 53 insertions, 53 deletions
diff --git a/testcases/features/copper.py b/testcases/features/copper.py
index 50319d96..be6744a9 100755
--- a/testcases/features/copper.py
+++ b/testcases/features/copper.py
@@ -28,10 +28,10 @@ parser.add_argument("-r", "--report",
action="store_true")
args = parser.parse_args()
-COPPER_REPO = functest_utils.get_parameter_from_yaml(
- 'general.directories.dir_repo_copper')
-RESULTS_DIR = functest_utils.get_parameter_from_yaml(
- 'general.directories.dir_results')
+COPPER_REPO = \
+ functest_utils.get_functest_config('general.directories.dir_repo_copper')
+RESULTS_DIR = \
+ functest_utils.get_functest_config('general.directories.dir_results')
logger = ft_logger.Logger("copper").getLogger()
diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py
index badcfe60..6c26875d 100755
--- a/testcases/features/doctor.py
+++ b/testcases/features/doctor.py
@@ -29,10 +29,10 @@ args = parser.parse_args()
functest_yaml = functest_utils.get_functest_yaml()
-DOCTOR_REPO = functest_utils.get_parameter_from_yaml(
- 'general.directories.dir_repo_doctor')
-RESULTS_DIR = functest_utils.get_parameter_from_yaml(
- 'general.directories.dir_results')
+DOCTOR_REPO = \
+ functest_utils.get_functest_config('general.directories.dir_repo_doctor')
+RESULTS_DIR = \
+ functest_utils.get_functest_config('general.directories.dir_results')
logger = ft_logger.Logger("doctor").getLogger()
diff --git a/testcases/features/domino.py b/testcases/features/domino.py
index 7835c5ce..75351a56 100755
--- a/testcases/features/domino.py
+++ b/testcases/features/domino.py
@@ -18,7 +18,7 @@ import argparse
import time
import functest.utils.functest_logger as ft_logger
-import functest.utils.functest_utils as functest_utils
+import functest.utils.functest_utils as ft_utils
parser = argparse.ArgumentParser()
@@ -27,12 +27,11 @@ parser.add_argument("-r", "--report",
action="store_true")
args = parser.parse_args()
-functest_yaml = functest_utils.get_functest_yaml()
-dirs = functest_yaml.get('general').get('directories')
-DOMINO_REPO = dirs.get('dir_repo_domino')
-RESULTS_DIR = functest_utils.get_parameter_from_yaml(
- 'general.directories.dir_results')
+DOMINO_REPO = \
+ ft_utils.get_functest_config('general.directories.dir_repo_domino')
+RESULTS_DIR = \
+ ft_utils.get_functest_config('general.directories.dir_results')
logger = ft_logger.Logger("domino").getLogger()
@@ -42,9 +41,9 @@ def main():
log_file = RESULTS_DIR + "/domino.log"
start_time = time.time()
- ret = functest_utils.execute_command(cmd,
- exit_on_error=False,
- output_file=log_file)
+ ret = ft_utils.execute_command(cmd,
+ exit_on_error=False,
+ output_file=log_file)
stop_time = time.time()
duration = round(stop_time - start_time, 1)
@@ -70,17 +69,18 @@ def main():
elif details['status'] == "SKIPPED":
status = "SKIP"
- functest_utils.logger_test_results("Domino",
- "domino-multinode",
- status, details)
+ ft_utils.logger_test_results("Domino",
+ "domino-multinode",
+ status,
+ details)
if args.report:
if status is not "SKIP":
- functest_utils.push_results_to_db("domino",
- "domino-multinode",
- start_time,
- stop_time,
- status,
- details)
+ ft_utils.push_results_to_db("domino",
+ "domino-multinode",
+ start_time,
+ stop_time,
+ status,
+ details)
logger.info("Domino results pushed to DB")
diff --git a/testcases/features/promise.py b/testcases/features/promise.py
index 5b23614d..cce0f5dc 100755
--- a/testcases/features/promise.py
+++ b/testcases/features/promise.py
@@ -32,34 +32,34 @@ parser.add_argument("-r", "--report",
args = parser.parse_args()
-dirs = ft_utils.get_parameter_from_yaml('general.directories')
+dirs = ft_utils.get_functest_config('general.directories')
PROMISE_REPO = dirs.get('dir_repo_promise')
-RESULTS_DIR = ft_utils.get_parameter_from_yaml(
- 'general.directories.dir_results')
-
-TENANT_NAME = ft_utils.get_parameter_from_yaml('promise.tenant_name')
-TENANT_DESCRIPTION = ft_utils.get_parameter_from_yaml(
- 'promise.tenant_description')
-USER_NAME = ft_utils.get_parameter_from_yaml('promise.user_name')
-USER_PWD = ft_utils.get_parameter_from_yaml('promise.user_pwd')
-IMAGE_NAME = ft_utils.get_parameter_from_yaml('promise.image_name')
-FLAVOR_NAME = ft_utils.get_parameter_from_yaml('promise.flavor_name')
-FLAVOR_VCPUS = ft_utils.get_parameter_from_yaml('promise.flavor_vcpus')
-FLAVOR_RAM = ft_utils.get_parameter_from_yaml('promise.flavor_ram')
-FLAVOR_DISK = ft_utils.get_parameter_from_yaml('promise.flavor_disk')
-
-
-GLANCE_IMAGE_FILENAME = ft_utils.get_parameter_from_yaml(
- 'general.openstack.image_file_name')
-GLANCE_IMAGE_FORMAT = ft_utils.get_parameter_from_yaml(
- 'general.openstack.image_disk_format')
-GLANCE_IMAGE_PATH = ft_utils.get_parameter_from_yaml(
- 'general.directories.dir_functest_data') + "/" + GLANCE_IMAGE_FILENAME
-
-NET_NAME = ft_utils.get_parameter_from_yaml('promise.network_name')
-SUBNET_NAME = ft_utils.get_parameter_from_yaml('promise.subnet_name')
-SUBNET_CIDR = ft_utils.get_parameter_from_yaml('promise.subnet_cidr')
-ROUTER_NAME = ft_utils.get_parameter_from_yaml('promise.router_name')
+RESULTS_DIR = ft_utils.get_functest_config('general.directories.dir_results')
+
+TENANT_NAME = ft_utils.get_functest_config('promise.tenant_name')
+TENANT_DESCRIPTION = \
+ ft_utils.get_functest_config('promise.tenant_description')
+USER_NAME = ft_utils.get_functest_config('promise.user_name')
+USER_PWD = ft_utils.get_functest_config('promise.user_pwd')
+IMAGE_NAME = ft_utils.get_functest_config('promise.image_name')
+FLAVOR_NAME = ft_utils.get_functest_config('promise.flavor_name')
+FLAVOR_VCPUS = ft_utils.get_functest_config('promise.flavor_vcpus')
+FLAVOR_RAM = ft_utils.get_functest_config('promise.flavor_ram')
+FLAVOR_DISK = ft_utils.get_functest_config('promise.flavor_disk')
+
+
+GLANCE_IMAGE_FILENAME = \
+ ft_utils.get_functest_config('general.openstack.image_file_name')
+GLANCE_IMAGE_FORMAT = \
+ ft_utils.get_functest_config('general.openstack.image_disk_format')
+GLANCE_IMAGE_PATH = \
+ ft_utils.get_functest_config('general.directories.dir_functest_data') + \
+ "/" + GLANCE_IMAGE_FILENAME
+
+NET_NAME = ft_utils.get_functest_config('promise.network_name')
+SUBNET_NAME = ft_utils.get_functest_config('promise.subnet_name')
+SUBNET_CIDR = ft_utils.get_functest_config('promise.subnet_cidr')
+ROUTER_NAME = ft_utils.get_functest_config('promise.router_name')
""" logging configuration """