Merge "openstack image create : --file and --volume exclude each other"

This commit is contained in:
Jenkins 2017-02-27 05:00:57 +00:00 committed by Gerrit Code Review
commit c6059bed4a
2 changed files with 6 additions and 4 deletions

View File

@ -128,12 +128,13 @@ class CreateImage(command.ShowOne):
metavar="<image-url>",
help=_("Copy image from the data store (similar to --location)"),
)
parser.add_argument(
source_group = parser.add_mutually_exclusive_group()
source_group.add_argument(
"--file",
metavar="<file>",
help=_("Upload image from local file"),
)
parser.add_argument(
source_group.add_argument(
"--volume",
metavar="<volume>",
help=_("Create image from a volume"),

View File

@ -164,12 +164,13 @@ class CreateImage(command.ShowOne):
type=int,
help=_("Minimum RAM size needed to boot image, in megabytes"),
)
parser.add_argument(
source_group = parser.add_mutually_exclusive_group()
source_group.add_argument(
"--file",
metavar="<file>",
help=_("Upload image from local file"),
)
parser.add_argument(
source_group.add_argument(
"--volume",
metavar="<volume>",
help=_("Create image from a volume"),