Revision b18ecea2 scripts/gnt-cluster

b/scripts/gnt-cluster
42 42
from ganeti import uidpool
43 43
from ganeti import compat
44 44

  
45
PREALLOC_WIPE_DISKS_OPT = cli_option("--prealloc-wipe-disks", default=False,
46
                                     action="store_true",
47
                                     dest="prealloc_wipe_disks",
48
                                     help=("Wipe disks prior to instance"
49
                                           " creation"))
45 50

  
46 51
@UsesRPC
47 52
def InitCluster(opts, args):
......
129 134
                        uid_pool=uid_pool,
130 135
                        default_iallocator=opts.default_iallocator,
131 136
                        primary_ip_version=primary_ip_version,
137
                        prealloc_wipe_disks=opts.prealloc_wipe_disks,
132 138
                        )
133 139
  op = opcodes.OpPostInitCluster()
134 140
  SubmitOpCode(op, opts=opts)
......
326 332
                                  roman=opts.roman_integers))
327 333
  ToStdout("  - default instance allocator: %s", result["default_iallocator"])
328 334
  ToStdout("  - primary ip version: %d", result["primary_ip_version"])
335
  ToStdout("  - preallocation wipe disks: %s", result["prealloc_wipe_disks"])
329 336

  
330 337
  ToStdout("Default instance parameters:")
331 338
  _PrintGroupedParams(result["beparams"], roman=opts.roman_integers)
......
862 869
     NOLVM_STORAGE_OPT, NOMODIFY_ETCHOSTS_OPT, NOMODIFY_SSH_SETUP_OPT,
863 870
     SECONDARY_IP_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
864 871
     UIDPOOL_OPT, DRBD_HELPER_OPT, NODRBD_STORAGE_OPT,
865
     DEFAULT_IALLOCATOR_OPT, PRIMARY_IP_VERSION_OPT],
872
     DEFAULT_IALLOCATOR_OPT, PRIMARY_IP_VERSION_OPT, PREALLOC_WIPE_DISKS_OPT],
866 873
    "[opts...] <cluster_name>", "Initialises a new cluster configuration"),
867 874
  'destroy': (
868 875
    DestroyCluster, ARGS_NONE, [YES_DOIT_OPT],

Also available in: Unified diff