From: Zack Cerza Date: Fri, 22 Aug 2014 19:37:49 +0000 (-0600) Subject: Don't dump all vm_host details when listing X-Git-Tag: 1.1.0~1221 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=92157d2b78fab36f26bb637db58ada94a27e02e9;p=teuthology.git Don't dump all vm_host details when listing Signed-off-by: Zack Cerza --- 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)