Revision e0e44476

b/lib/client/gnt_group.py
343 343
    "Lists all available fields for node groups"),
344 344
  "modify": (
345 345
    SetGroupParams, ARGS_ONE_GROUP,
346
    [DRY_RUN_OPT] + SUBMIT_OPTS + [ALLOC_POLICY_OPT, NODE_PARAMS_OPT,
347
    HV_STATE_OPT, DISK_STATE_OPT, DISK_PARAMS_OPT, PRIORITY_OPT]
346
    [DRY_RUN_OPT] + SUBMIT_OPTS +
347
    [ALLOC_POLICY_OPT, NODE_PARAMS_OPT, HV_STATE_OPT, DISK_STATE_OPT,
348
     DISK_PARAMS_OPT, PRIORITY_OPT]
348 349
    + INSTANCE_POLICY_OPTS,
349 350
    "<group_name>", "Alters the parameters of a node group"),
350 351
  "remove": (
b/lib/cmdlib/network.py
717 717
      _NetworkConflictCheck(
718 718
        self, lambda nic: nic.network == self.network_uuid, "disconnect from",
719 719
        [instance_info for (_, instance_info) in
720
        self.cfg.GetMultiInstanceInfoByName(owned_instances)])
720
         self.cfg.GetMultiInstanceInfoByName(owned_instances)])
721 721

  
722 722
  def Exec(self, feedback_fn):
723 723
    # Disconnect the network and update the group only if network is connected
b/lib/query.py
1945 1945
    fields.extend([
1946 1946
        (_MakeField("disk.size/%s" % i, "Disk/%s" % i, QFT_UNIT,
1947 1947
                    "Disk size of %s disk" % numtext),
1948
        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
1948
         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
1949 1949
        (_MakeField("disk.spindles/%s" % i, "DiskSpindles/%s" % i, QFT_NUMBER,
1950 1950
                    "Spindles of %s disk" % numtext),
1951 1951
         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSpindles)),
1952 1952
        (_MakeField("disk.name/%s" % i, "DiskName/%s" % i, QFT_TEXT,
1953 1953
                    "Name of %s disk" % numtext),
1954
        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
1954
         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
1955 1955
        (_MakeField("disk.uuid/%s" % i, "DiskUUID/%s" % i, QFT_TEXT,
1956 1956
                    "UUID of %s disk" % numtext),
1957
        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
1957
         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
1958 1958

  
1959 1959
  return fields
1960 1960

  
......
2794 2794
  # Add fields for usage statistics
2795 2795
  fields.extend([
2796 2796
    (_MakeField(name, title, kind, doc), NETQ_STATS, 0,
2797
    compat.partial(_GetNetworkStatsField, name, kind))
2797
     compat.partial(_GetNetworkStatsField, name, kind))
2798 2798
    for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()])
2799 2799

  
2800 2800
  # Add timestamps
b/qa/qa_cluster.py
499 499

  
500 500
  for fail, cmd in [
501 501
    (False, ["gnt-cluster", "modify",
502
            "--enabled-disk-templates=%s" % file_disk_template,
503
            "--ipolicy-disk-templates=%s" % file_disk_template]),
502
             "--enabled-disk-templates=%s" % file_disk_template,
503
             "--ipolicy-disk-templates=%s" % file_disk_template]),
504 504
    (False, ["gnt-cluster", "modify",
505
            "--%s=%s" % (option_name, file_storage_dir)]),
505
             "--%s=%s" % (option_name, file_storage_dir)]),
506 506
    (False, ["gnt-cluster", "modify",
507
            "--%s=%s" % (option_name, invalid_file_storage_dir)]),
507
             "--%s=%s" % (option_name, invalid_file_storage_dir)]),
508 508
    # file storage dir is set to an inacceptable path, thus verify
509 509
    # should fail
510 510
    (True, ["gnt-cluster", "verify"]),
......
513 513
    (True, ["gnt-cluster", "modify",
514 514
            "--%s=" % option_name]),
515 515
    (False, ["gnt-cluster", "modify",
516
            "--%s=%s" % (option_name, file_storage_dir)]),
516
             "--%s=%s" % (option_name, file_storage_dir)]),
517 517
    (False, ["gnt-cluster", "modify",
518
            "--enabled-disk-templates=%s" % other_disk_template,
519
            "--ipolicy-disk-templates=%s" % other_disk_template]),
518
             "--enabled-disk-templates=%s" % other_disk_template,
519
             "--ipolicy-disk-templates=%s" % other_disk_template]),
520 520
    (False, ["gnt-cluster", "modify",
521
            "--%s=%s" % (option_name, invalid_file_storage_dir)]),
521
             "--%s=%s" % (option_name, invalid_file_storage_dir)]),
522 522
    # file storage is set to an inacceptable path, but file storage
523 523
    # is disabled, thus verify should not fail
524 524
    (False, ["gnt-cluster", "verify"]),
525 525
    # unsetting the file storage dir while file storage is not enabled
526 526
    # should be fine
527 527
    (False, ["gnt-cluster", "modify",
528
            "--%s=" % option_name]),
528
             "--%s=" % option_name]),
529 529
    # resetting everything to sane values
530 530
    (False, ["gnt-cluster", "modify",
531
            "--%s=%s" % (option_name, file_storage_dir),
532
            "--enabled-disk-templates=%s" % ",".join(enabled_disk_templates),
533
            "--ipolicy-disk-templates=%s" % ",".join(enabled_disk_templates)])
531
             "--%s=%s" % (option_name, file_storage_dir),
532
             "--enabled-disk-templates=%s" % ",".join(enabled_disk_templates),
533
             "--ipolicy-disk-templates=%s" % ",".join(enabled_disk_templates)])
534 534
    ]:
535 535
    AssertCommand(cmd, fail=fail)
536 536

  

Also available in: Unified diff