summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-07-14 02:02:58 +0000
committerBrian Waldon <bcwaldon@gmail.com>2012-07-13 20:12:00 -0700
commit95a7f9dffeae6d108c7e22475efca7df9d5ffd97 (patch)
tree884f0c4f3d081b14211e0734023a86ba5b2ff715
parent8bf9e112447f97b57d744465cef99b823f544c03 (diff)
downloadpython-glanceclient-95a7f9dffeae6d108c7e22475efca7df9d5ffd97.tar.gz
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
-rw-r--r--glanceclient/v2/shell.py2
1 files changed, 2 insertions, 0 deletions
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)