diff options
| author | Amey Bhide <abhide@vmware.com> | 2015-05-22 11:24:09 -0700 |
|---|---|---|
| committer | Amey Bhide <abhide@vmware.com> | 2015-05-25 22:49:55 -0700 |
| commit | ba21d463de948697b1e884cae883a0e64a4d35f6 (patch) | |
| tree | 3f526963f6dde9a9320a1d8e6e48bc48f2fc3f86 /openstackclient/image/v1 | |
| parent | 61cfebb8aa7c20dd8ae5f4a79f57fbb3c38fd104 (diff) | |
| download | python-openstackclient-ba21d463de948697b1e884cae883a0e64a4d35f6.tar.gz | |
Add missing properties to image set command
Enable user to update the following image properties from OSC:
container-format, disk-format, size
Closes-Bug: #1446362
Change-Id: Id9f40f15702e8f14f0327a37fcc7d7971338c258
Diffstat (limited to 'openstackclient/image/v1')
| -rw-r--r-- | openstackclient/image/v1/image.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py index 830b99ba..d4d45fa2 100644 --- a/openstackclient/image/v1/image.py +++ b/openstackclient/image/v1/image.py @@ -508,6 +508,28 @@ class SetImage(show.ShowOne): type=int, help="Minimum RAM size needed to boot image, in megabytes", ) + container_choices = ["ami", "ari", "aki", "bare", "ovf"] + parser.add_argument( + "--container-format", + metavar="<container-format>", + help=("Container format of image. Acceptable formats: %s" % + container_choices), + choices=container_choices + ) + disk_choices = ["ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", + "vdi", "iso"] + parser.add_argument( + "--disk-format", + metavar="<disk-format>", + help="Disk format of image. Acceptable formats: %s" % disk_choices, + choices=disk_choices + ) + parser.add_argument( + "--size", + metavar="<size>", + type=int, + help="Size of image data (in bytes)" + ) protected_group = parser.add_mutually_exclusive_group() protected_group.add_argument( "--protected", @@ -545,7 +567,8 @@ class SetImage(show.ShowOne): image_client = self.app.client_manager.image kwargs = {} - copy_attrs = ('name', 'owner', 'min_disk', 'min_ram', 'properties') + copy_attrs = ('name', 'owner', 'min_disk', 'min_ram', 'properties', + 'container_format', 'disk_format', 'size') for attr in copy_attrs: if attr in parsed_args: val = getattr(parsed_args, attr, None) |
