From 95a7f9dffeae6d108c7e22475efca7df9d5ffd97 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Sat, 14 Jul 2012 02:02:58 +0000 Subject: [PATCH] Prevent links from being printed in v2 CLI Nobody wants to see links in a human interface. This prevents the file, access, self and schema links from being printed when calling image-show or explain. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a11 --- glanceclient/v2/shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py index 7a100a7..abfa3bf 100644 --- a/glanceclient/v2/shell.py +++ b/glanceclient/v2/shell.py @@ -28,6 +28,8 @@ def do_image_list(gc, args): def do_image_show(gc, args): """Describe a specific image.""" image = gc.images.get(args.id) + ignore = ['self', 'access', 'file', 'schema'] + image = dict([item for item in image.iteritems() if item[0] not in ignore]) utils.print_dict(image)