doc = """
usage: teuthology-queue -h
teuthology-queue [-d] -m MACHINE_TYPE
+ teuthology-queue [-r] -m MACHINE_TYPE
teuthology-queue -m MACHINE_TYPE -D PATTERN
List Jobs in queue:
-h, --help Show this help message and exit
-D, --delete PATTERN Delete Jobs with PATTERN in their name
-d, --description Show job descriptions
+ -r, --runs Only show run names
""".format(archive_base=teuthology.config.config.archive_base)
def main(args):
machine_type = args['--machine_type']
delete = args['--delete']
+ runs = args['--runs']
show_desc = args['--description']
try:
connection = connect()
if delete:
walk_jobs(connection, machine_type,
delete_matching_jobs)
+ elif runs:
+ walk_jobs(connection, machine_type,
+ print_matching_runs)
else:
walk_jobs(connection, machine_type,
_print_matching_jobs(show_desc))