From 92157d2b78fab36f26bb637db58ada94a27e02e9 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 22 Aug 2014 13:37:49 -0600 Subject: [PATCH] Don't dump all vm_host details when listing Signed-off-by: Zack Cerza --- teuthology/lock.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/teuthology/lock.py b/teuthology/lock.py index b0ce02ddf9..5bc9b3c810 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -120,6 +120,14 @@ def main(ctx): statuses = [_status for _status in statuses if _status['description'] is not None and _status['description'].find(ctx.desc_pattern) >= 0] + + # When listing, only show the vm_host's name, not every detail + for s in statuses: + if not s.get('is_vm', False): + continue + vm_host_name = s.get('vm_host', dict())['name'] + if vm_host_name: + s['vm_host'] = vm_host_name if ctx.list: print json.dumps(statuses, indent=4) -- 2.39.5