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
This commit is contained in:
Brian Waldon
2012-07-14 02:02:58 +00:00
parent 8bf9e11244
commit 95a7f9dffe

View File

@@ -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)