Add 'explain' command to v2 that describes schemas
At its core, this is adding the ability to finx a schema through published links and convert it to a usable object. Related to bp glance-client-v2 Change-Id: I7b38ad091c6b0ad80197eb789503cf73989893e5
This commit is contained in:
@@ -21,3 +21,11 @@ def do_image_list(gc, args):
|
||||
images = gc.images.list()
|
||||
columns = ['ID', 'Name']
|
||||
utils.print_list(images, columns)
|
||||
|
||||
|
||||
@utils.arg('name', metavar='<NAME>', help='Name of model to describe.')
|
||||
def do_explain(gc, args):
|
||||
"""Describe a specific model."""
|
||||
schema = gc.schemas.get(args.name)
|
||||
columns = ['Name', 'Description']
|
||||
utils.print_list(schema.properties, columns)
|
||||
|
||||
Reference in New Issue
Block a user