]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock: filter machine type for --list, --list-targets
authorSage Weil <sage@inktank.com>
Sat, 13 Jul 2013 20:11:40 +0000 (13:11 -0700)
committerSage Weil <sage@inktank.com>
Thu, 18 Jul 2013 03:54:16 +0000 (20:54 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/lock.py

index 390f36ea45947fb08672b2f487c07b93dc05eadb..41bae325d8d46299269b87c90dff596d3ec38ff7 100644 (file)
@@ -296,6 +296,9 @@ Lock, unlock, or query lock status of machines.
             else:
                 statuses = list_locks(ctx)
         if statuses:
+            if ctx.machine_type:
+                statuses = [status for status in statuses \
+                                if status['type'] == ctx.machine_type]
             if not machines and ctx.owner is None and not ctx.all:
                 ctx.owner = teuthology.get_user()
             if ctx.owner is not None: