diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-12-02 18:50:17 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-12-02 18:50:17 +0000 |
| commit | 7078502ea6607af570ce90309833c46c979a7718 (patch) | |
| tree | f12afa6323149d4d3c47363984d652429438b1b8 | |
| parent | d1f1f092c4e9073f750f4c32d1b343b19b463ded (diff) | |
| parent | a7a0d0c61a6a88e044b781bbc4903cdcfc919e55 (diff) | |
| download | python-openstackclient-7078502ea6607af570ce90309833c46c979a7718.tar.gz | |
Merge "Sort list images by name by default"
| -rw-r--r-- | doc/source/command-objects/image.rst | 2 | ||||
| -rw-r--r-- | openstackclient/image/v1/image.py | 3 | ||||
| -rw-r--r-- | openstackclient/image/v2/image.py | 3 | ||||
| -rw-r--r-- | releasenotes/notes/bug-1639231-21823768bd54170a.yaml | 6 |
4 files changed, 11 insertions, 3 deletions
diff --git a/doc/source/command-objects/image.rst b/doc/source/command-objects/image.rst index 5184f446..7fc33c69 100644 --- a/doc/source/command-objects/image.rst +++ b/doc/source/command-objects/image.rst @@ -222,7 +222,7 @@ List available images .. option:: --sort <key>[:<direction>] - Sort output by selected keys and directions(asc or desc) (default: asc), + Sort output by selected keys and directions(asc or desc) (default: name:asc), multiple keys and directions can be specified separated by comma .. option:: --limit <limit> diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py index 0d54e339..eb79cd2f 100644 --- a/openstackclient/image/v1/image.py +++ b/openstackclient/image/v1/image.py @@ -353,8 +353,9 @@ class ListImage(command.Lister): parser.add_argument( '--sort', metavar="<key>[:<direction>]", + default='name:asc', help=_("Sort output by selected keys and directions(asc or desc) " - "(default: asc), multiple keys and directions can be " + "(default: name:asc), multiple keys and directions can be " "specified separated by comma"), ) return parser diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 4031952b..054d1612 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -450,8 +450,9 @@ class ListImage(command.Lister): parser.add_argument( '--sort', metavar="<key>[:<direction>]", + default='name:asc', help=_("Sort output by selected keys and directions(asc or desc) " - "(default: asc), multiple keys and directions can be " + "(default: name:asc), multiple keys and directions can be " "specified separated by comma"), ) parser.add_argument( diff --git a/releasenotes/notes/bug-1639231-21823768bd54170a.yaml b/releasenotes/notes/bug-1639231-21823768bd54170a.yaml new file mode 100644 index 00000000..740a0dd1 --- /dev/null +++ b/releasenotes/notes/bug-1639231-21823768bd54170a.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The ``image list`` command will now sort by name in ascending order by + default. ``--sort`` option will have the default value of ``name:asc``. + [Bug `1639231 <https://bugs.launchpad.net/bugs/1639231>`_] |
