Add --sort-key and --sort-dir to image-list

The --sort-key and --sort-dir CLI options allow users to control the
field and direction by which their images are sorted in an image-list
operation. The previous default sort behavior of sorting by ID asc has
been preserved.

Fixes bug 1082957.

Change-Id: I1d3664219c275b0379fe176f8288d6ffae0dffbe
This commit is contained in:
Brian Waldon
2012-11-25 14:26:02 -05:00
parent c0ec97f310
commit 4da8b287b4
4 changed files with 80 additions and 3 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ def print_list(objs, fields, formatters={}):
row.append(data)
pt.add_row(row)
print pt.get_string(sortby=fields[0])
print pt.get_string()
def print_dict(d):