- make_option("-n", "--node", dest="node",
- help="Target node and optional secondary node",
- metavar="<pnode>[:<snode>]"),
- cli_option("-s", "--os-size", dest="size", help="Disk size, in MiB unless"
- " a suffix is used",
- default=20 * 1024, type="unit", metavar="<size>"),
- cli_option("--swap-size", dest="swap", help="Swap size",
- default=4 * 1024, type="unit", metavar="<size>"),
- cli_option("-m", "--memory", dest="mem", help="Memory size",
- default=128, type="unit", metavar="<mem>"),
- make_option("-p", "--cpu", dest="vcpus", help="Number of virtual CPUs",
- default=1, type="int", metavar="<PROC>"),
- make_option("-t", "--disk-template", dest="disk_template",
- help="Custom disk setup (diskless, file, plain, drbd)",
- default=None, metavar="TEMPL"),
- make_option("-i", "--ip", dest="ip",
- help="IP address ('none' [default], 'auto', or specify address)",
- default='none', type="string", metavar="<ADDRESS>"),
- make_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
- action="store_false", help="Don't wait for sync (DANGEROUS!)"),
- make_option("-b", "--bridge", dest="bridge",
- help="Bridge to connect this instance to",
- default=None, metavar="<bridge>"),
- make_option("--src-node", dest="src_node", help="Source node",
- metavar="<node>"),
- make_option("--src-dir", dest="src_dir", help="Source directory",
- metavar="<dir>"),
- make_option("--no-ip-check", dest="ip_check", default=True,
- action="store_false", help="Don't check that the instance's IP"
- " is alive"),
- make_option("--iallocator", metavar="<NAME>",
- help="Select nodes for the instance automatically using the"
- " <NAME> iallocator plugin", default=None, type="string"),
- make_option("--file-storage-dir", dest="file_storage_dir",
- help="Relative path under default cluster-wide file storage dir"
- " to store file-based disks", default=None,
- metavar="<DIR>"),
- make_option("--file-driver", dest="file_driver", help="Driver to use"
- " for image files", default="loop", metavar="<DRIVER>"),
+ cli_option("-n", "--node", dest="node",
+ help="Target node and optional secondary node",
+ metavar="<pnode>[:<snode>]",
+ completion_suggest=OPT_COMPL_INST_ADD_NODES),
+ 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)),
+ cli_option("--disk", help="Disk information",
+ default=[], dest="disks",
+ action="append",
+ type="identkeyval"),
+ 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",
+ default=None, type="unit", metavar="<size>"),
+ cli_option("--net", help="NIC information",
+ default=[], dest="nics",
+ action="append",
+ type="identkeyval"),
+ cli_option("--no-nics", default=False, action="store_true",
+ help="Do not create any network cards for the instance"),
+ cli_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
+ action="store_false", help="Don't wait for sync (DANGEROUS!)"),
+ cli_option("--src-node", dest="src_node", help="Source node",
+ metavar="<node>",
+ completion_suggest=OPT_COMPL_ONE_NODE),
+ cli_option("--src-dir", dest="src_dir", help="Source directory",
+ metavar="<dir>"),
+ cli_option("--no-ip-check", dest="ip_check", default=True,
+ action="store_false", help="Don't check that the instance's IP"
+ " is alive"),
+ cli_option("-I", "--iallocator", metavar="<NAME>",
+ help="Select nodes for the instance automatically using the"
+ " <NAME> iallocator plugin", default=None, type="string",
+ completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
+ cli_option("--file-storage-dir", dest="file_storage_dir",
+ help="Relative path under default cluster-wide file storage dir"
+ " 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>",
+ 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,
+ type="identkeyval"),