diff options
author | Juha Kosonen <juha.kosonen@nokia.com> | 2016-02-12 15:43:11 +0000 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-02-12 16:26:07 +0000 |
commit | bcf423b3f3d295e714fbce1d0073dbbeb07b894f (patch) | |
tree | 9f175e0f0855f88937e0fffab8f8a1a04213df92 /testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | |
parent | 9da9ac0798e48b13a50ef137f6e8532f07995d95 (diff) |
Rally live migration case selection
Execute live migration cases only if the feature is enabled in Tempest configuration file.
Change-Id: Ie88da2a8f6a4e22cbc96d6aa1f749d555ac58d84
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
(cherry picked from commit 1d62586d396d948c523fb0b0e351ae162e7fdc6b)
Diffstat (limited to 'testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py')
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index 0d1992604..5f5cd62f1 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -14,6 +14,7 @@ # and push result into test DB # import argparse +import iniparse import json import logging import os @@ -111,6 +112,8 @@ CONCURRENCY = 4 ### RESULTS_DIR = functest_yaml.get("general").get("directories"). \ get("dir_rally_res") +TEMPEST_CONF_FILE = functest_yaml.get("general").get("directories"). \ + get("dir_results") + '/tempest/tempest.conf' TEST_DB = functest_yaml.get("results").get("test_db_url") PRIVATE_NETWORK = functest_yaml.get("general"). \ get("openstack").get("neutron_private_net_name") @@ -179,6 +182,16 @@ def task_succeed(json_raw): return True +def live_migration_supported(): + config = iniparse.ConfigParser() + if config.read(TEMPEST_CONF_FILE) and \ + config.has_section('compute-feature-enabled') and \ + config.has_option('compute-feature-enabled', 'live_migration'): + return config.getboolean('compute-feature-enabled', 'live_migration') + + return False + + def build_task_args(test_file_name): task_args = {'service_list': [test_file_name]} task_args['smoke'] = args.smoke @@ -201,6 +214,7 @@ def build_task_args(test_file_name): net_id = functest_utils.get_network_id(client_dict['neutron'], PRIVATE_NETWORK) task_args['netid'] = str(net_id) + task_args['live_migration'] = live_migration_supported() return task_args |