Revision 5949c31c qa/qa_config.py
b/qa/qa_config.py | ||
---|---|---|
372 | 372 |
_ENABLED_DISK_TEMPLATES_KEY, |
373 | 373 |
constants.DEFAULT_ENABLED_DISK_TEMPLATES) |
374 | 374 |
|
375 |
def GetEnabledStorageTypes(self): |
|
376 |
"""Returns the list of enabled storage types. |
|
377 |
|
|
378 |
@rtype: list |
|
379 |
@returns: the list of storage types enabled for QA |
|
380 |
|
|
381 |
""" |
|
382 |
enabled_disk_templates = self.GetEnabledDiskTemplates() |
|
383 |
enabled_storage_types = list(set([constants.DISK_TEMPLATES_STORAGE_TYPE[dt] |
|
384 |
for dt in enabled_disk_templates])) |
|
385 |
# Storage type 'lvm-pv' cannot be activated via a disk template, |
|
386 |
# therefore we add it if 'lvm-vg' is present. |
|
387 |
if constants.ST_LVM_VG in enabled_storage_types: |
|
388 |
enabled_storage_types.append(constants.ST_LVM_PV) |
|
389 |
return enabled_storage_types |
|
390 |
|
|
375 | 391 |
def GetDefaultDiskTemplate(self): |
376 | 392 |
"""Returns the default disk template to be used. |
377 | 393 |
|
... | ... | |
593 | 609 |
return GetConfig().GetEnabledDiskTemplates(*args) |
594 | 610 |
|
595 | 611 |
|
612 |
def GetEnabledStorageTypes(*args): |
|
613 |
"""Wrapper for L{_QaConfig.GetEnabledStorageTypes}. |
|
614 |
|
|
615 |
""" |
|
616 |
return GetConfig().GetEnabledStorageTypes(*args) |
|
617 |
|
|
618 |
|
|
596 | 619 |
def GetDefaultDiskTemplate(*args): |
597 | 620 |
"""Wrapper for L{_QaConfig.GetDefaultDiskTemplate}. |
598 | 621 |
|
Also available in: Unified diff