Revision 1338f2b4 scripts/gnt-cluster

b/scripts/gnt-cluster
39 39
from ganeti import bootstrap
40 40
from ganeti import ssh
41 41
from ganeti import objects
42
from ganeti import uidpool
42 43

  
43 44

  
44 45
@UsesRPC
......
601 602
          opts.enabled_hypervisors or opts.hvparams or
602 603
          opts.beparams or opts.nicparams or
603 604
          opts.candidate_pool_size is not None or
605
          opts.uid_pool is not None or
604 606
          opts.maintain_node_health is not None):
605 607
    ToStderr("Please give at least one of the parameters.")
606 608
    return 1
......
628 630
  nicparams = opts.nicparams
629 631
  utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
630 632

  
633

  
631 634
  mnh = opts.maintain_node_health
632 635

  
636
  uid_pool = opts.uid_pool
637
  if uid_pool is not None:
638
    uid_pool = uidpool.ParseUidPool(uid_pool)
639

  
633 640
  op = opcodes.OpSetClusterParams(vg_name=vg_name,
634 641
                                  enabled_hypervisors=hvlist,
635 642
                                  hvparams=hvparams,
......
637 644
                                  beparams=beparams,
638 645
                                  nicparams=nicparams,
639 646
                                  candidate_pool_size=opts.candidate_pool_size,
640
                                  maintain_node_health=mnh)
647
                                  maintain_node_health=mnh,
648
                                  uid_pool=uid_pool)
641 649
  SubmitOpCode(op, opts=opts)
642 650
  return 0
643 651

  
......
788 796
  'modify': (
789 797
    SetClusterParams, ARGS_NONE,
790 798
    [BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT,
791
     NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT],
799
     NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
800
     UIDPOOL_OPT],
792 801
    "[opts...]",
793 802
    "Alters the parameters of the cluster"),
794 803
  "renew-crypto": (

Also available in: Unified diff