"CONFIRM_OPT",
"DEBUG_OPT",
"DEBUG_SIMERR_OPT",
+ "DISK_TEMPLATE_OPT",
"FIELDS_OPT",
"FORCE_OPT",
"NOHDR_OPT",
default=True, action="store_false",
help="Don't wait for sync (DANGEROUS!)")
+DISK_TEMPLATE_OPT = cli_option("-t", "--disk-template", dest="disk_template",
+ help="Custom disk setup (diskless, file,"
+ " plain or drbd)",
+ default=None, metavar="TEMPL",
+ choices=list(constants.DISK_TEMPLATES))
+
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
cli_option("-B", "--backend", dest="beparams",
type="keyval", default={},
help="Backend parameters"),
- cli_option("-t", "--disk-template", dest="disk_template",
- help="Custom disk setup (diskless, file, plain, drbd)",
- default=None, metavar="TEMPL",
- choices=list(constants.DISK_TEMPLATES)),
+ DISK_TEMPLATE_OPT,
cli_option("--disk", help="Disk information",
default=[], dest="disks",
action="append",
help="Memory size for the instance (MiB)"),
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",
- choices=list(constants.DISK_TEMPLATES)),
+ DISK_TEMPLATE_OPT,
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"
cli_option("-B", "--backend", dest="beparams",
type="keyval", default={},
help="Backend parameters"),
- cli_option("-t", "--disk-template", dest="disk_template",
- help="Custom disk setup (diskless, file, plain or drbd)",
- default=None, metavar="TEMPL",
- choices=list(constants.DISK_TEMPLATES)),
+ DISK_TEMPLATE_OPT,
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",