summaryrefslogtreecommitdiff
path: root/openstackclient/image/v1/image.py
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-10-21 00:40:48 +0000
committerGerrit Code Review <review@openstack.org>2017-10-21 00:40:48 +0000
commit3abba6ede9ea01fbdfc94a13e3252b7b98d56c34 (patch)
tree269d00d8534cd0d0e00dbecfa637d7737542f817 /openstackclient/image/v1/image.py
parent161c79f7037364d6e69e43f1d0a9c605b96ebb88 (diff)
parent4464109c7754a9287f75ec2af84398700d1450e6 (diff)
downloadpython-openstackclient-3abba6ede9ea01fbdfc94a13e3252b7b98d56c34.tar.gz
Merge "Accept 0 for --min-disk and --min-ram"
Diffstat (limited to 'openstackclient/image/v1/image.py')
-rw-r--r--openstackclient/image/v1/image.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py
index b92da8ce..7a8e67bf 100644
--- a/openstackclient/image/v1/image.py
+++ b/openstackclient/image/v1/image.py
@@ -625,11 +625,11 @@ class SetImage(command.Command):
kwargs = {}
copy_attrs = ('name', 'owner', 'min_disk', 'min_ram', 'properties',
'container_format', 'disk_format', 'size', 'store',
- 'location', 'copy_from', 'volume', 'force', 'checksum')
+ 'location', 'copy_from', 'volume', 'checksum')
for attr in copy_attrs:
if attr in parsed_args:
val = getattr(parsed_args, attr, None)
- if val:
+ if val is not None:
# Only include a value in kwargs for attributes that are
# actually present on the command line
kwargs[attr] = val
@@ -653,6 +653,8 @@ class SetImage(command.Command):
kwargs['is_public'] = True
if parsed_args.private:
kwargs['is_public'] = False
+ if parsed_args.force:
+ kwargs['force'] = True
# Wrap the call to catch exceptions in order to close files
try: