summaryrefslogtreecommitdiff
path: root/glanceclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-10 11:52:07 +0000
committerGerrit Code Review <review@openstack.org>2015-09-10 11:52:07 +0000
commit2c800e513430cda9ccfb51d8009b1d5dcad08cd5 (patch)
treec656305f16a61c7e1fecd7e5d4580370fc77b9b6 /glanceclient
parent337b2dce72726a90200bf89960e033f83888fd73 (diff)
parentc8c8964ddd5a49de6eb4794fba68ab4ec0400b08 (diff)
downloadpython-glanceclient-2c800e513430cda9ccfb51d8009b1d5dcad08cd5.tar.gz
Merge "Updates default --sort behaviour"
Diffstat (limited to 'glanceclient')
-rw-r--r--glanceclient/v2/shell.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py
index 8585d60..3ae5d41 100644
--- a/glanceclient/v2/shell.py
+++ b/glanceclient/v2/shell.py
@@ -142,8 +142,8 @@ def do_image_update(gc, args):
help='Sort image list in specified directions.')
@utils.arg('--sort', metavar='<key>[:<direction>]', default=None,
help=(("Comma-separated list of sort keys and directions in the "
- "form of <key>[:<asc|desc>]. Valid keys: %s. OPTIONAL: "
- "Default='name:asc'.") % ', '.join(images.SORT_KEY_VALUES)))
+ "form of <key>[:<asc|desc>]. Valid keys: %s. OPTIONAL."
+ ) % ', '.join(images.SORT_KEY_VALUES)))
def do_image_list(gc, args):
"""List images you can access."""
filter_keys = ['visibility', 'member_status', 'owner', 'checksum', 'tag']
@@ -169,7 +169,8 @@ def do_image_list(gc, args):
if args.sort is not None:
kwargs['sort'] = args.sort
elif not args.sort_dir and not args.sort_key:
- kwargs['sort'] = 'name:asc'
+ kwargs['sort_key'] = 'name'
+ kwargs['sort_dir'] = 'asc'
columns = ['ID', 'Name']