Revision 847a7b02 qa/qa_cluster.py

b/qa/qa_cluster.py
573 573
  instance_template = enabled_disk_templates[0]
574 574
  instance = qa_instance.CreateInstanceByDiskTemplate(nodes, instance_template)
575 575

  
576
  _TestClusterModifyUnusedDiskTemplate(instance_template)
577 576
  _TestClusterModifyUsedDiskTemplate(instance_template,
578 577
                                     enabled_disk_templates)
579 578

  
......
777 776
    fail=True)
778 777

  
779 778

  
780
def _TestClusterModifyUnusedDiskTemplate(instance_template):
781
  """Tests that unused disk templates can be disabled safely."""
782
  all_disk_templates = constants.DISK_TEMPLATES
783
  if not utils.IsLvmEnabled(qa_config.GetEnabledDiskTemplates()):
784
    all_disk_templates = list(set(all_disk_templates) -
785
                              constants.DTS_LVM)
786

  
787
  AssertCommand(
788
    ["gnt-cluster", "modify",
789
     "--enabled-disk-templates=%s" % ",".join(all_disk_templates),
790
     "--ipolicy-disk-templates=%s" % ",".join(all_disk_templates)],
791
    fail=False)
792
  new_disk_templates = [instance_template]
793
  AssertCommand(
794
    ["gnt-cluster", "modify",
795
     "--enabled-disk-templates=%s" % ",".join(new_disk_templates),
796
     "--ipolicy-disk-templates=%s" % ",".join(new_disk_templates)],
797
    fail=False)
798

  
799

  
800 779
def TestClusterModifyBe():
801 780
  """gnt-cluster modify -B"""
802 781
  for fail, cmd in [

Also available in: Unified diff