Commit 224b89fa authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add more auto-completion metadata


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent c38c44ad
......@@ -219,7 +219,8 @@ import_opts = [
help="Backend parameters"),
cli_option("-t", "--disk-template", dest="disk_template",
help="Custom disk setup (diskless, file, plain, drbd)",
default=None, metavar="TEMPL"),
default=None, metavar="TEMPL",
choices=list(constants.DISK_TEMPLATES)),
cli_option("--disk", help="Disk information",
default=[], dest="disks",
action="append",
......@@ -251,7 +252,8 @@ import_opts = [
" to store file-based disks", default=None,
metavar="<DIR>"),
cli_option("--file-driver", dest="file_driver", help="Driver to use"
" for image files", default="loop", metavar="<DRIVER>"),
" for image files", default="loop", metavar="<DRIVER>",
choices=list(constants.FILE_DRIVER)),
cli_option("-H", "--hypervisor", dest="hypervisor",
help="Hypervisor and hypervisor options, in the format"
" hypervisor:option=value,option=value,...", default=None,
......
......@@ -160,7 +160,8 @@ commands = {
cli_option("--disks", default="4096,4096",
help="Comma separated list of disk sizes (MiB)"),
cli_option("-t", "--disk-template", default="drbd",
help="Select the disk template"),
help="Select the disk template",
choices=list(constants.DISK_TEMPLATES)),
cli_option("--nics", default="00:11:22:33:44:55",
help="Comma separated list of nics, each nic"
" definition is of form mac/ip/bridge, if"
......
......@@ -1376,7 +1376,8 @@ add_opts = [
help="Backend parameters"),
cli_option("-t", "--disk-template", dest="disk_template",
help="Custom disk setup (diskless, file, plain or drbd)",
default=None, metavar="TEMPL"),
default=None, metavar="TEMPL",
choices=list(constants.DISK_TEMPLATES)),
cli_option("-s", "--os-size", dest="sd_size", help="Disk size for a"
" single-disk configuration, when not using the --disk option,"
" in MiB unless a suffix is used",
......@@ -1404,7 +1405,8 @@ add_opts = [
" to store file-based disks", default=None,
metavar="<DIR>"),
cli_option("--file-driver", dest="file_driver", help="Driver to use"
" for image files", default="loop", metavar="<DRIVER>"),
" for image files", default="loop", metavar="<DRIVER>",
choices=list(constants.FILE_DRIVER)),
cli_option("-I", "--iallocator", metavar="<NAME>",
help="Select nodes for the instance automatically using the"
" <NAME> iallocator plugin", default=None, type="string"),
......
......@@ -296,11 +296,15 @@ class Burner(object):
metavar="<OS>")
parser.add_option("--disk-size", dest="disk_size",
help="Disk size (determines disk count)",
default="128m", type="string", metavar="<size,size,...>")
default="128m", type="string", metavar="<size,size,...>",
completion_suggest=("128M 512M 1G 4G 1G,256M"
" 4G,1G,1G 10G").split())
parser.add_option("--disk-growth", dest="disk_growth", help="Disk growth",
default="128m", type="string", metavar="<size,size,...>")
parser.add_option("--mem-size", dest="mem_size", help="Memory size",
default=128, type="unit", metavar="<size>")
default=128, type="unit", metavar="<size>",
completion_suggest=("128M 256M 512M 1G 4G 8G"
" 12G 16G").split())
parser.add_option("-v", "--verbose",
action="store_true", dest="verbose", default=False,
help="print command execution messages to stdout")
......@@ -364,7 +368,8 @@ class Burner(object):
parser.add_option("--net-timeout", default=15, type="int",
dest="net_timeout",
help="The instance check network timeout in seconds"
" (defaults to 15 seconds)")
" (defaults to 15 seconds)",
completion_suggest="15 60 300 900".split())
parser.add_option("-C", "--http-check", default=False, action="store_true",
dest="http_check",
help="Enable checking of instance status via http,"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment