From ff91e26983578bf1b77e1d68fb1ae26067eed7ea Mon Sep 17 00:00:00 2001 From: lihaijing Date: Wed, 23 Aug 2017 11:23:27 +0800 Subject: [PATCH] Update image cli doc and fix some typos Change-Id: I0a8d095e51a96804c97612e28fac2d00aa94c638 Closes-Bug: #1711284 --- doc/source/cli/command-objects/image.rst | 68 ++++++++++++++---------- openstackclient/image/v2/image.py | 2 +- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/doc/source/cli/command-objects/image.rst b/doc/source/cli/command-objects/image.rst index 92efd0a54..e2257bbbb 100644 --- a/doc/source/cli/command-objects/image.rst +++ b/doc/source/cli/command-objects/image.rst @@ -16,7 +16,8 @@ Associate project with image openstack image add project [--project-domain ] - + + .. option:: --project-domain @@ -60,7 +61,8 @@ Create/upload an image [--public | --private | --community | --shared] [--property [...] ] [--tag [...] ] - [--project [--project-domain ]] + [--project ] + [--project-domain ] .. option:: --id @@ -153,11 +155,11 @@ Create/upload an image .. option:: --property - Set a property on this image (repeat for multiple values) + Set a property on this image (repeat option to set multiple properties) .. option:: --tag - Set a tag on this image (repeat for multiple values) + Set a tag on this image (repeat option to set multiple tags) .. versionadded:: 2 @@ -205,13 +207,12 @@ List available images openstack image list [--public | --private | --shared] [--property ] + [--name ] + [--status ] [--long] [--sort [:]] [--limit ] [--marker ] - [--name ] - [--status ] - .. option:: --public @@ -231,6 +232,18 @@ List available images Filter output based on property +.. option:: --name + + Filter images based on name + + *Image version 2 only.* + +.. option:: --status + + Filter images based on status + + *Image version 2 only* + .. option:: --long List additional fields in output @@ -251,15 +264,6 @@ List available images The last image of the previous page. Display list of images after marker. Display all images if not specified. (name or ID) -.. option:: --name - - Filter images based on name - -.. option:: --status - - Filter images based on status - - *Image version 2 only* image remove project @@ -272,7 +276,7 @@ Disassociate project with image .. program:: image remove project .. code:: bash - openstack image remove remove + openstack image remove project [--project-domain ] @@ -347,8 +351,9 @@ Set image properties [--os-distro ] [--os-version ] [--ramdisk-id ] - [--activate|--deactivate] - [--project [--project-domain ]] + [--deactivate | --activate] + [--project ] + [--project-domain ] [--accept | --reject | --pending] @@ -460,7 +465,7 @@ Set image properties .. option:: --tag - Set a tag on this image (repeat for multiple values) + Set a tag on this image (repeat option to set multiple tags) .. versionadded:: 2 @@ -500,18 +505,18 @@ Set image properties .. versionadded:: 2 -.. option:: --activate - - Activate the image. - - .. versionadded:: 2 - .. option:: --deactivate Deactivate the image. .. versionadded:: 2 +.. option:: --activate + + Activate the image. + + .. versionadded:: 2 + .. option:: --project Set an alternate project on this image (name or ID). @@ -568,8 +573,13 @@ Display image details .. code:: bash openstack image show + [--human-readable] +.. option:: --human-readable + + Print image size in a human-friendly format. + .. _image_show-image: .. describe:: @@ -585,16 +595,16 @@ Unset image tags or properties .. program:: image unset .. code:: bash - openstack image set + openstack image unset [--tag ] - [--property ] + [--property ] .. option:: --tag Unset a tag on this image (repeat option to unset multiple tags) -.. option:: --property +.. option:: --property Unset a property on this image (repeat option to unset multiple properties) diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 30dd93805..a2e45fc70 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -995,7 +995,7 @@ class UnsetImage(command.Command): parser.add_argument( "--property", dest="properties", - metavar="", + metavar="", default=[], action='append', help=_("Unset a property on this image "