From: Sage Weil Date: Sat, 13 Jul 2013 20:11:40 +0000 (-0700) Subject: lock: filter machine type for --list, --list-targets X-Git-Tag: 1.1.0~2078^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=99c40128e4597f739fb10054aacda777ae5cddc0;p=teuthology.git lock: filter machine type for --list, --list-targets Signed-off-by: Sage Weil --- diff --git a/teuthology/lock.py b/teuthology/lock.py index 390f36ea4..41bae325d 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -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: