]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology-lock --summary: allow --machine-type=all
authorDan Mick <dan.mick@inktank.com>
Wed, 5 Jun 2013 00:46:05 +0000 (17:46 -0700)
committerDan Mick <dan.mick@inktank.com>
Mon, 10 Jun 2013 21:10:52 +0000 (14:10 -0700)
Somehow this got lost; putting it back

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit e4eb4aa23b66a5b33cf6ff14305ae8c3d328fb50)

teuthology/lock.py

index afc43081cd8a31ca8e2b2556874e2cf420773fe3..a716bfcbd846c70ac0b75e4a0b22f3377689ab08 100644 (file)
@@ -483,7 +483,7 @@ def scan_for_locks(ctx, machines):
 def do_summary(ctx):
     lockd = collections.defaultdict(lambda: [0,0,'unknown'])
     for l in list_locks(ctx):
-        if l['type'] != ctx.machine_type:
+        if ctx.machine_type != 'all' and l['type'] != ctx.machine_type:
             continue
         who =  l['locked_by'] if l['locked'] == 1 else '(free)', l['type']
         lockd[who][0] += 1