summaryrefslogtreecommitdiff
path: root/openstackclient/image/v2
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-24 15:30:08 +0000
committerGerrit Code Review <review@openstack.org>2017-01-24 15:30:08 +0000
commit1ef0dae8b1347d78cecec8007031679e7315f77b (patch)
treecef0e7bb9a0cbd776f5c9a84d43f58099e47ad10 /openstackclient/image/v2
parent11ef43da495a7d9f6b36c095457e945070dfa38d (diff)
parent80c62021c829ceb878b8d51cedeca6fd6c688dd0 (diff)
downloadpython-openstackclient-1ef0dae8b1347d78cecec8007031679e7315f77b.tar.gz
Merge "Update container format choices"
Diffstat (limited to 'openstackclient/image/v2')
-rw-r--r--openstackclient/image/v2/image.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py
index 418cc397..29499ec2 100644
--- a/openstackclient/image/v2/image.py
+++ b/openstackclient/image/v2/image.py
@@ -30,6 +30,7 @@ from openstackclient.i18n import _
from openstackclient.identity import common
+CONTAINER_CHOICES = ["ami", "ari", "aki", "bare", "docker", "ova", "ovf"]
DEFAULT_CONTAINER_FORMAT = 'bare'
DEFAULT_DISK_FORMAT = 'raw'
DISK_CHOICES = ["ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vhdx",
@@ -135,9 +136,13 @@ class CreateImage(command.ShowOne):
parser.add_argument(
"--container-format",
default=DEFAULT_CONTAINER_FORMAT,
+ choices=CONTAINER_CHOICES,
metavar="<container-format>",
- help=_("Image container format "
- "(default: %s)") % DEFAULT_CONTAINER_FORMAT,
+ help=(_("Image container format. "
+ "The supported options are: %(option_list)s. "
+ "The default format is: %(default_opt)s") %
+ {'option_list': ', '.join(CONTAINER_CHOICES),
+ 'default_opt': DEFAULT_CONTAINER_FORMAT})
)
parser.add_argument(
"--disk-format",
@@ -659,8 +664,9 @@ class SetImage(command.Command):
parser.add_argument(
"--container-format",
metavar="<container-format>",
- help=_("Image container format "
- "(default: %s)") % DEFAULT_CONTAINER_FORMAT,
+ choices=CONTAINER_CHOICES,
+ help=_("Image container format. The supported options are: %s") %
+ ', '.join(CONTAINER_CHOICES)
)
parser.add_argument(
"--disk-format",