]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Allow setting default machine_type per-lab 356/head
authorZack Cerza <zack.cerza@inktank.com>
Wed, 12 Nov 2014 20:46:01 +0000 (13:46 -0700)
committerZack Cerza <zack.cerza@inktank.com>
Wed, 12 Nov 2014 20:46:01 +0000 (13:46 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
scripts/suite.py
teuthology/suite.py

index 4cfc88a7c71926a3b06b1ab33b52d88d73d8a87e..8554845dc82b4b1d5f33f165cbb7d81da8ac5c05 100644 (file)
@@ -1,6 +1,7 @@
 import docopt
 
 import teuthology.suite
+from teuthology.config import config
 
 doc = """
 usage: teuthology-suite --help
@@ -37,7 +38,7 @@ Standard arguments:
                               The teuthology branch to run against.
                               [default: master]
   -m <type>, --machine-type <type>
-                              Machine type [default: plana,mira,burnupi]
+                              Machine type [default: {default_machine_type}]
   -d <distro>, --distro <distro>
                               Distribution to run against
                               [default: ubuntu]
@@ -71,7 +72,7 @@ Scheduler arguments:
   --filter-out KEYWORDS       Do not run jobs whose name contains any of
                               the keywords in the comma separated keyword
                               string specified.
-"""
+""".format(default_machine_type=config.default_machine_type)
 
 
 def main():
index 6d24aeac8ca61620cf8964fb9bbd170231cecd6d..49f350c91467f0701d428cebc09232d1ec43ae9c 100644 (file)
@@ -38,7 +38,9 @@ def main(args):
     kernel_flavor = args['--flavor']
     teuthology_branch = args['--teuthology-branch']
     machine_type = args['--machine-type']
-    if 'multi' in machine_type:
+    if not machine_type or machine_type == 'None':
+        schedule_fail("Must specify a machine_type")
+    elif 'multi' in machine_type:
         schedule_fail("'multi' is not a valid machine_type. " +
                       "Maybe you want 'plana,mira,burnupi' or similar")
     distro = args['--distro']
@@ -469,7 +471,7 @@ def schedule_suite(job_config,
                     all_filt_val = True
                     continue
             if all_filt_val:
-                continue        
+                continue
 
         raw_yaml = '\n'.join([file(a, 'r').read() for a in fragment_paths])