From: Nathan Cutler Date: Mon, 13 Mar 2017 08:25:56 +0000 (+0100) Subject: run.py: Provide --os-{type,version} values to get_initial_tasks X-Git-Tag: 1.1.0~320^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1046%2Fhead;p=teuthology.git run.py: Provide --os-{type,version} values to get_initial_tasks We want to be able to check the final values of os_type and os_version in get_initial_tasks, so move the command-line override up to before the get_initial_tasks() method call. Signed-off-by: Nathan Cutler --- diff --git a/teuthology/run.py b/teuthology/run.py index 3addee227..5be014d16 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -349,6 +349,13 @@ def main(args): if suite_repo: teuth_config.ceph_qa_suite_git_url = suite_repo + # overwrite the config values of os_{type,version} if corresponding + # command-line arguments are provided + if os_type: + config["os_type"] = os_type + if os_version: + config["os_version"] = os_version + config["tasks"] = validate_tasks(config) init_tasks = get_initial_tasks(lock, config, machine_type) @@ -362,14 +369,6 @@ def main(args): # fetches the tasks and returns a new suite_path if needed config["suite_path"] = fetch_tasks_if_needed(config) - # overwrite the config value of os_type if --os-type is provided - if os_type: - config["os_type"] = os_type - - # overwrite the config value of os_version if --os-version is provided - if os_version: - config["os_version"] = os_version - # If the job has a 'use_shaman' key, use that value to override the global # config's value. if config.get('use_shaman') is not None: