Revision b883637f 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"))
50 45

  
51 46
@UsesRPC
52 47
def InitCluster(opts, args):
......
110 105
  if uid_pool is not None:
111 106
    uid_pool = uidpool.ParseUidPool(uid_pool)
112 107

  
108
  if opts.prealloc_wipe_disks is None:
109
    opts.prealloc_wipe_disks = False
110

  
113 111
  try:
114 112
    primary_ip_version = int(opts.primary_ip_version)
115 113
  except (ValueError, TypeError), err:
......
716 714
          opts.add_uids is not None or
717 715
          opts.remove_uids is not None or
718 716
          opts.default_iallocator is not None or
719
          opts.reserved_lvs is not None):
717
          opts.reserved_lvs is not None or
718
          opts.prealloc_wipe_disks is not None):
720 719
    ToStderr("Please give at least one of the parameters.")
721 720
    return 1
722 721

  
......
785 784
                                  add_uids=add_uids,
786 785
                                  remove_uids=remove_uids,
787 786
                                  default_iallocator=opts.default_iallocator,
787
                                  prealloc_wipe_disks=opts.prealloc_wipe_disks,
788 788
                                  reserved_lvs=opts.reserved_lvs)
789 789
  SubmitOpCode(op, opts=opts)
790 790
  return 0
......
945 945
     NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
946 946
     UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT, DRBD_HELPER_OPT,
947 947
     NODRBD_STORAGE_OPT, DEFAULT_IALLOCATOR_OPT, RESERVED_LVS_OPT,
948
     DRY_RUN_OPT, PRIORITY_OPT],
948
     DRY_RUN_OPT, PRIORITY_OPT, PREALLOC_WIPE_DISKS_OPT],
949 949
    "[opts...]",
950 950
    "Alters the parameters of the cluster"),
951 951
  "renew-crypto": (

Also available in: Unified diff