diff options
| author | NiallBunting <niall.bunting@hp.com> | 2015-09-25 13:21:01 +0000 |
|---|---|---|
| committer | NiallBunting <niall.bunting@hp.com> | 2015-11-06 10:43:08 +0000 |
| commit | 5ad59968ac4257c76aec9bd62c417fe8b5403608 (patch) | |
| tree | d129ecad5b6f53b13fccd1f8580b1934dda6e93b /openstackclient/image | |
| parent | 8a1fb85dba6963dee974f896fa9cc345c3a3aff5 (diff) | |
| download | python-openstackclient-5ad59968ac4257c76aec9bd62c417fe8b5403608.tar.gz | |
Add --owner to `image create`
This adds --owner to `image create`. This is backwards compatable with v1.
Change-Id: I9e79cf880c91a1386419db729818d23dfe632179
Depends-On: I8d572a070bbb04dccdd051b8e0ad199c5754746e
Diffstat (limited to 'openstackclient/image')
| -rw-r--r-- | openstackclient/image/v2/image.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 7d8b1412..6fd6c74e 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -112,7 +112,7 @@ class CreateImage(show.ShowOne): """Create/upload an image""" log = logging.getLogger(__name__ + ".CreateImage") - deadopts = ('owner', 'size', 'location', 'copy-from', 'checksum', 'store') + deadopts = ('size', 'location', 'copy-from', 'checksum', 'store') def get_parser(self, prog_name): parser = super(CreateImage, self).get_parser(prog_name) @@ -120,7 +120,6 @@ class CreateImage(show.ShowOne): # TODO(bunting): There are additional arguments that v1 supported # that v2 either doesn't support or supports weirdly. # --checksum - could be faked clientside perhaps? - # --owner - could be set as an update after the put? # --location - maybe location add? # --size - passing image size is actually broken in python-glanceclient # --copy-from - does not exist in v2 @@ -150,6 +149,11 @@ class CreateImage(show.ShowOne): "(default: %s)" % DEFAULT_DISK_FORMAT, ) parser.add_argument( + "--owner", + metavar="<owner>", + help="Image owner project name or ID", + ) + parser.add_argument( "--min-disk", metavar="<disk-gb>", type=int, @@ -229,7 +233,7 @@ class CreateImage(show.ShowOne): copy_attrs = ('name', 'id', 'container_format', 'disk_format', 'min_disk', 'min_ram', - 'tags') + 'tags', 'owner') for attr in copy_attrs: if attr in parsed_args: val = getattr(parsed_args, attr, None) |
