]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
run.py: Provide --os-{type,version} values to get_initial_tasks 1046/head
authorNathan Cutler <ncutler@suse.com>
Mon, 13 Mar 2017 08:25:56 +0000 (09:25 +0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 13 Mar 2017 08:25:56 +0000 (09:25 +0100)
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 <ncutler@suse.com>
teuthology/run.py

index 3addee22701a5da238353c0e7de5666840d90af1..5be014d1631cd4d03865daad1d5b237e0a6bf097 100644 (file)
@@ -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: