Revision dacd8ba4 qa/qa_cluster.py

b/qa/qa_cluster.py
190 190
    "gnt-cluster", "init",
191 191
    "--primary-ip-version=%d" % qa_config.get("primary_ip_version", 4),
192 192
    "--enabled-hypervisors=%s" % ",".join(qa_config.GetEnabledHypervisors()),
193
    "--enabled-storage-types=%s" %
194
      ",".join(qa_config.GetEnabledStorageTypes())
193 195
    ]
194 196

  
195 197
  for spec_type in ("mem-size", "disk-size", "disk-count", "cpu-count",
......
402 404
    AssertCommand(["gnt-cluster", "modify", "-D", param], fail=True)
403 405

  
404 406

  
407
def TestClusterModifyStorageTypes():
408
  """gnt-cluster modify --enabled-storage-types=..."""
409
  default_storage_type = qa_config.GetDefaultStorageType()
410
  AssertCommand(
411
    ["gnt-cluster", "modify",
412
     "--enabled-storage-types=%s" % default_storage_type],
413
    fail=False)
414
  AssertCommand(["gnt-cluster", "info"])
415
  AssertCommand(
416
    ["gnt-cluster", "modify",
417
     "--enabled-storage-types=%s" %
418
       ",".join(qa_config.GetEnabledStorageTypes())],
419
    fail=False)
420
  AssertCommand(["gnt-cluster", "info"])
421
  # bogus types
422
  AssertCommand(["gnt-cluster", "modify",
423
                 "--enabled-storage-types=pinkbunny"],
424
                fail=True)
425
  # duplicate entries do no harm
426
  AssertCommand(
427
    ["gnt-cluster", "modify",
428
     "--enabled-storage-types=%s,%s" %
429
      (default_storage_type, default_storage_type)],
430
    fail=False)
431
  AssertCommand(["gnt-cluster", "info"])
432

  
433

  
405 434
def TestClusterModifyBe():
406 435
  """gnt-cluster modify -B"""
407 436
  for fail, cmd in [

Also available in: Unified diff