From 99c40128e4597f739fb10054aacda777ae5cddc0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 13 Jul 2013 13:11:40 -0700 Subject: [PATCH] lock: filter machine type for --list, --list-targets Signed-off-by: Sage Weil --- teuthology/lock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teuthology/lock.py b/teuthology/lock.py index 390f36ea45947..41bae325d8d46 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: -- 2.39.5