diff options
| author | Zuul <zuul@review.opendev.org> | 2022-11-11 15:55:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2022-11-11 15:55:05 +0000 |
| commit | f41f2c388b73c7111eaff4c924b97f149e1fcf26 (patch) | |
| tree | af43eda3b4205a234d36bbf19f891d2f09c628b4 /glanceclient/v2 | |
| parent | 4e7f83e887038998af1431bff1b8c1511d84b75a (diff) | |
| parent | 74fa43665719ddc830999fa15bb052a87d69dd14 (diff) | |
| download | python-glanceclient-4.2.0.tar.gz | |
Merge "schema_args: Do not generate option for read-only properties"4.2.0
Diffstat (limited to 'glanceclient/v2')
| -rw-r--r-- | glanceclient/v2/shell.py | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py index 773c198..93a9377 100644 --- a/glanceclient/v2/shell.py +++ b/glanceclient/v2/shell.py @@ -49,11 +49,7 @@ def get_image_schema(): return IMAGE_SCHEMA -@utils.schema_args(get_image_schema, omit=['created_at', 'updated_at', 'file', - 'checksum', 'virtual_size', 'size', - 'status', 'schema', 'direct_url', - 'locations', 'self', 'os_hidden', - 'os_hash_value', 'os_hash_algo']) +@utils.schema_args(get_image_schema, omit=['locations', 'os_hidden']) # NOTE(rosmaita): to make this option more intuitive for end users, we # do not use the Glance image property name 'os_hidden' here. This means # we must include 'os_hidden' in the 'omit' list above and handle the @@ -118,11 +114,7 @@ def do_image_create(gc, args): utils.print_image(image) -@utils.schema_args(get_image_schema, omit=['created_at', 'updated_at', 'file', - 'checksum', 'virtual_size', 'size', - 'status', 'schema', 'direct_url', - 'locations', 'self', 'os_hidden', - 'os_hash_value', 'os_hash_algo']) +@utils.schema_args(get_image_schema, omit=['locations', 'os_hidden']) # NOTE: --hidden requires special handling; see note at do_image_create @utils.arg('--hidden', type=strutils.bool_from_string, metavar='[True|False]', default=None, @@ -354,12 +346,8 @@ def _validate_backend(backend, gc): @utils.arg('id', metavar='<IMAGE_ID>', help=_('ID of image to update.')) -@utils.schema_args(get_image_schema, omit=['id', 'locations', 'created_at', - 'updated_at', 'file', 'checksum', - 'virtual_size', 'size', 'status', - 'schema', 'direct_url', 'tags', - 'self', 'os_hidden', - 'os_hash_value', 'os_hash_algo']) +@utils.schema_args(get_image_schema, omit=['id', 'locations', 'tags', + 'os_hidden']) # NOTE: --hidden requires special handling; see note at do_image_create @utils.arg('--hidden', type=strutils.bool_from_string, metavar='[True|False]', default=None, @@ -1105,8 +1093,7 @@ def do_md_namespace_import(gc, args): @utils.schema_args(get_namespace_schema, omit=['property_count', 'properties', 'tag_count', 'tags', 'object_count', 'objects', - 'resource_type_associations', - 'schema']) + 'resource_type_associations']) def do_md_namespace_update(gc, args): """Update an existing metadata definitions namespace.""" schema = gc.schemas.get('metadefs/namespace') |
