diff options
Diffstat (limited to 'openstackclient/image/v1')
| -rw-r--r-- | openstackclient/image/v1/image.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/openstackclient/image/v1/image.py b/openstackclient/image/v1/image.py index 1f239b67..f4944afa 100644 --- a/openstackclient/image/v1/image.py +++ b/openstackclient/image/v1/image.py @@ -36,6 +36,7 @@ from openstackclient.api import utils as api_utils from openstackclient.i18n import _ +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", @@ -84,8 +85,12 @@ class CreateImage(command.ShowOne): "--container-format", default=DEFAULT_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: %(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", @@ -498,13 +503,12 @@ class SetImage(command.Command): 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 + choices=CONTAINER_CHOICES, + help=_("Image container format. The supported options are: %s") % + ', '.join(CONTAINER_CHOICES) ) parser.add_argument( "--disk-format", |
