Revision f79be8ec lib/utils/storage.py

b/lib/utils/storage.py
117 117
  return (constants.ST_LVM_PV, cfg.GetVGName())
118 118

  
119 119

  
120
# List of storage type for which space reporting is implemented.
121
# FIXME: Remove this, once the backend is capable to do this for all
122
# storage types.
123
_DISK_TEMPLATES_SPACE_QUERYABLE = GetLvmDiskTemplates() \
124
    + GetDiskTemplatesOfStorageType(constants.ST_FILE)
125

  
126

  
127 120
def GetStorageUnitsOfCluster(cfg, include_spindles=False):
128 121
  """Examines the cluster's configuration and returns a list of storage
129 122
  units and their storage keys, ordered by the order in which they
......
145 138
  cluster_config = cfg.GetClusterInfo()
146 139
  storage_units = []
147 140
  for disk_template in cluster_config.enabled_disk_templates:
148
    if disk_template in _DISK_TEMPLATES_SPACE_QUERYABLE:
141
    if constants.DISK_TEMPLATES_STORAGE_TYPE[disk_template]\
142
        in constants.STS_REPORT:
149 143
      storage_units.append(
150 144
          _GetDefaultStorageUnitForDiskTemplate(cfg, disk_template))
151 145
  if include_spindles:

Also available in: Unified diff