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:
@@ -57,7 +57,7 @@ def do_image_create(gc, args):
|
|||||||
|
|
||||||
|
|
||||||
@utils.arg('id', metavar='<IMAGE_ID>', help='ID of image to update.')
|
@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',
|
@utils.arg('--property', metavar="<key=value>", action='append',
|
||||||
default=[], help=('Arbitrary property to associate with image.'
|
default=[], help=('Arbitrary property to associate with image.'
|
||||||
' May be used multiple times.'))
|
' May be used multiple times.'))
|
||||||
|
|||||||
Reference in New Issue
Block a user