From: Zack Cerza Date: Wed, 12 Nov 2014 20:46:01 +0000 (-0700) Subject: Allow setting default machine_type per-lab X-Git-Tag: 1.1.0~1071^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=adc14690c37c38b261682a3bd4e0653b2daaef1d;p=teuthology.git Allow setting default machine_type per-lab Signed-off-by: Zack Cerza --- diff --git a/scripts/suite.py b/scripts/suite.py index 4cfc88a7c7..8554845dc8 100644 --- a/scripts/suite.py +++ b/scripts/suite.py @@ -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 , --machine-type - Machine type [default: plana,mira,burnupi] + Machine type [default: {default_machine_type}] -d , --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(): diff --git a/teuthology/suite.py b/teuthology/suite.py index 6d24aeac8c..49f350c914 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -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])