doc = """
usage: teuthology-queue -h
- teuthology-queue [-d] -m MACHINE_TYPE
+ teuthology-queue [-d|-f] -m MACHINE_TYPE
teuthology-queue [-r] -m MACHINE_TYPE
teuthology-queue -m MACHINE_TYPE -D PATTERN
-D, --delete PATTERN Delete Jobs with PATTERN in their name
-d, --description Show job descriptions
-r, --runs Only show run names
+ -f, --full Print the entire job config. Use with caution.
""".format(archive_base=teuthology.config.config.archive_base)
import beanstalkc
import yaml
import logging
+import pprint
import sys
from collections import OrderedDict
class JobPrinter(JobProcessor):
- def __init__(self, show_desc=False):
+ def __init__(self, show_desc=False, full=False):
super(JobPrinter, self).__init__()
self.show_desc = show_desc
+ self.full = full
def process_job(self, job_id):
job_config = self.jobs[job_id]['job_config']
job_id=job_id,
job_name=job_name,
)
- if job_desc and self.show_desc:
+ if self.full:
+ pprint.pprint(job_config)
+ elif job_desc and self.show_desc:
for desc in job_desc.split():
print '\t {desc}'.format(desc=desc)
delete = args['--delete']
runs = args['--runs']
show_desc = args['--description']
+ full = args['--full']
try:
connection = connect()
watch_tube(connection, machine_type)
RunPrinter())
else:
walk_jobs(connection, machine_type,
- JobPrinter(show_desc=show_desc))
+ JobPrinter(show_desc=show_desc, full=full))
except KeyboardInterrupt:
log.info("Interrupted.")
finally: