]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Add --runs, to print only run names
authorZack Cerza <zack@cerza.org>
Tue, 29 Apr 2014 16:26:39 +0000 (11:26 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 30 Apr 2014 19:30:43 +0000 (14:30 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
scripts/queue.py
teuthology/beanstalk.py

index 2dc1bd4b2b8174827c7d7856f1cae9118050dff1..324aade020110bb277613dc4558312f7d827f648 100644 (file)
@@ -6,6 +6,7 @@ import teuthology.beanstalk
 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:
@@ -19,6 +20,7 @@ optional arguments:
   -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)
index afa4e30539df6b30c215ce1ffea040d006d8586b..ebbe9dbce45319b35b91c89d9741cbaa778c34c2 100644 (file)
@@ -100,6 +100,7 @@ def print_matching_runs(jobs_dict):
 def main(args):
     machine_type = args['--machine_type']
     delete = args['--delete']
+    runs = args['--runs']
     show_desc = args['--description']
     try:
         connection = connect()
@@ -107,6 +108,9 @@ def main(args):
         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))