Remove readonly options from v2 shell commands
This commit is removing the read-only properties from shell options to prevent user from doing invalid requests using the client. Change-Id: I17e9578e705bd3cf628fe39630ebecc4ea43e392 Closes-Bug: 1350802
This commit is contained in:

committed by
Erno Kuvaja

parent
711f28a5a8
commit
d0851c32ed
@@ -35,7 +35,9 @@ def get_image_schema():
|
||||
return IMAGE_SCHEMA
|
||||
|
||||
|
||||
@utils.schema_args(get_image_schema)
|
||||
@utils.schema_args(get_image_schema, omit=['created_at', 'updated_at', 'file',
|
||||
'checksum', 'virtual_size', 'size',
|
||||
'status', 'schema', 'direct_url'])
|
||||
@utils.arg('--property', metavar="<key=value>", action='append',
|
||||
default=[], help=('Arbitrary property to associate with image.'
|
||||
' May be used multiple times.'))
|
||||
@@ -58,7 +60,10 @@ 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', 'tags'])
|
||||
@utils.schema_args(get_image_schema, omit=['id', 'locations', 'created_at',
|
||||
'updated_at', 'file', 'checksum',
|
||||
'virtual_size', 'size', 'status',
|
||||
'schema', 'direct_url', 'tags'])
|
||||
@utils.arg('--property', metavar="<key=value>", action='append',
|
||||
default=[], help=('Arbitrary property to associate with image.'
|
||||
' May be used multiple times.'))
|
||||
|
Reference in New Issue
Block a user