CLI image-update gives a wrong help on '--tags' param

The help message tells end user image-update interface accepts 'tags'
param and could be used to update tag of image [0], but actually it
could trigger an 400 exception [1] due to wrong PATCH calls, and the
correct way is to use image-tag-update interface [2] as designed.

[0] glance image-update <IMG_ID> --tags <TAG_VALUE>

[1] 400 Bad Request
    Invalid JSON pointer for this resource: '/tags/0'
        (HTTP 400)

[2] glance image-tag-update <IMG_ID> <TAG_VALUE>

Change-Id: Iaa8041779510192dc08f7b898b8a1beda29a6398
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This commit is contained in:
Zhi Yan Liu
2014-07-10 13:54:35 +08:00
parent d613adc434
commit 8770586e7a

View File

@@ -57,7 +57,7 @@ def do_image_create(gc, args):
@utils.arg('id', metavar='<IMAGE_ID>', help='ID of image to update.')
@utils.schema_args(get_image_schema, omit=['id', 'locations'])
@utils.schema_args(get_image_schema, omit=['id', 'locations', 'tags'])
@utils.arg('--property', metavar="<key=value>", action='append',
default=[], help=('Arbitrary property to associate with image.'
' May be used multiple times.'))