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:
@@ -28,6 +28,8 @@ def do_image_list(gc, args):
|
|||||||
def do_image_show(gc, args):
|
def do_image_show(gc, args):
|
||||||
"""Describe a specific image."""
|
"""Describe a specific image."""
|
||||||
image = gc.images.get(args.id)
|
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)
|
utils.print_dict(image)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user