]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Don't reread the entire yaml file...
authorZack Cerza <zack@cerza.org>
Thu, 12 Jun 2014 17:50:41 +0000 (12:50 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 25 Jun 2014 18:54:22 +0000 (12:54 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/suite.py

index 0810666bcd9d98db801343332c46024ed02ee18a..fb6c10e3d318d60c69d2466087a205a31ba99549 100644 (file)
@@ -35,7 +35,7 @@ def main(args):
     if verbose:
         teuthology.log.setLevel(logging.DEBUG)
 
-    arch = get_arch(base_yaml_paths)
+    arch = get_arch(machine_type)
 
     if ',' in machine_type:
         worker = 'multi'
@@ -270,14 +270,10 @@ def build_matrix(path):
     return []
 
 
-def get_arch(config):
-    for yamlfile in config:
-        y = yaml.safe_load(file(yamlfile))
-        machine_type = y.get('machine_type')
-        if machine_type:
-            locks = lock.list_locks()
-            for machine in locks:
-                if machine['type'] == machine_type:
-                    arch = machine['arch']
-                    return arch
+def get_arch(machine_type):
+    locks = lock.list_locks()
+    for machine in locks:
+        if machine['type'] == machine_type:
+            arch = machine['arch']
+            return arch
     return None