From: Zack Cerza Date: Fri, 11 Jul 2014 20:18:03 +0000 (-0600) Subject: Add a --dry-run flag to teuthology-schedule X-Git-Tag: v0.94.10~27^2^2~364^2~38 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcd22a532f04eddd0b2f947131d15fe3939be6d7;p=ceph.git Add a --dry-run flag to teuthology-schedule Signed-off-by: Zack Cerza --- diff --git a/scripts/schedule.py b/scripts/schedule.py index 2fc62cec3192..9d43f0be4d3e 100644 --- a/scripts/schedule.py +++ b/scripts/schedule.py @@ -33,6 +33,8 @@ optional arguments: --timeout How many seconds to wait for jobs to finish before emailing results. Only applies to the last job in a suite. + --dry-run Instead of scheduling, just output the + job config. """ diff --git a/teuthology/schedule.py b/teuthology/schedule.py index 18dad4921cb3..37bd28702403 100644 --- a/teuthology/schedule.py +++ b/teuthology/schedule.py @@ -1,3 +1,4 @@ +import pprint import yaml import teuthology.beanstalk @@ -14,7 +15,10 @@ def main(args): raise ValueError( '--timeout is only applicable to the last job in a suite') job_config = build_config(args) - schedule_job(job_config, args['--num']) + if args['--dry-run']: + pprint.pprint(job_config) + else: + schedule_job(job_config, args['--num']) def build_config(args):