from ganeti import uidpool
from ganeti import compat
+PREALLOC_WIPE_DISKS_OPT = cli_option("--prealloc-wipe-disks", default=False,
+ action="store_true",
+ dest="prealloc_wipe_disks",
+ help=("Wipe disks prior to instance"
+ " creation"))
@UsesRPC
def InitCluster(opts, args):
uid_pool=uid_pool,
default_iallocator=opts.default_iallocator,
primary_ip_version=primary_ip_version,
+ prealloc_wipe_disks=opts.prealloc_wipe_disks,
)
op = opcodes.OpPostInitCluster()
SubmitOpCode(op, opts=opts)
roman=opts.roman_integers))
ToStdout(" - default instance allocator: %s", result["default_iallocator"])
ToStdout(" - primary ip version: %d", result["primary_ip_version"])
+ ToStdout(" - preallocation wipe disks: %s", result["prealloc_wipe_disks"])
ToStdout("Default instance parameters:")
_PrintGroupedParams(result["beparams"], roman=opts.roman_integers)
NOLVM_STORAGE_OPT, NOMODIFY_ETCHOSTS_OPT, NOMODIFY_SSH_SETUP_OPT,
SECONDARY_IP_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
UIDPOOL_OPT, DRBD_HELPER_OPT, NODRBD_STORAGE_OPT,
- DEFAULT_IALLOCATOR_OPT, PRIMARY_IP_VERSION_OPT],
+ DEFAULT_IALLOCATOR_OPT, PRIMARY_IP_VERSION_OPT, PREALLOC_WIPE_DISKS_OPT],
"[opts...] <cluster_name>", "Initialises a new cluster configuration"),
'destroy': (
DestroyCluster, ARGS_NONE, [YES_DOIT_OPT],