Revision 20faaa74 lib/cmdlib/node.py
b/lib/cmdlib/node.py | ||
---|---|---|
1183 | 1183 |
# filter out non-vm_capable nodes |
1184 | 1184 |
toquery_node_uuids = [node.uuid for node in all_info.values() |
1185 | 1185 |
if node.vm_capable and node.uuid in node_uuids] |
1186 |
lvm_enabled = utils.storage.IsLvmEnabled( |
|
1187 |
lu.cfg.GetClusterInfo().enabled_disk_templates) |
|
1186 | 1188 |
# FIXME: this per default asks for storage space information for all |
1187 | 1189 |
# enabled disk templates. Fix this by making it possible to specify |
1188 | 1190 |
# space report fields for specific disk templates. |
1189 | 1191 |
raw_storage_units = utils.storage.GetStorageUnitsOfCluster( |
1190 |
lu.cfg, include_spindles=True)
|
|
1192 |
lu.cfg, include_spindles=lvm_enabled)
|
|
1191 | 1193 |
storage_units = rpc.PrepareStorageUnitsForNodes( |
1192 | 1194 |
lu.cfg, raw_storage_units, toquery_node_uuids) |
1193 |
lvm_enabled = utils.storage.IsLvmEnabled( |
|
1194 |
lu.cfg.GetClusterInfo().enabled_disk_templates) |
|
1195 | 1195 |
default_hypervisor = lu.cfg.GetHypervisorType() |
1196 | 1196 |
hvparams = lu.cfg.GetClusterInfo().hvparams[default_hypervisor] |
1197 | 1197 |
hvspecs = [(default_hypervisor, hvparams)] |
... | ... | |
1199 | 1199 |
hvspecs) |
1200 | 1200 |
live_data = dict( |
1201 | 1201 |
(uuid, rpc.MakeLegacyNodeInfo(nresult.payload, |
1202 |
require_vg_info=lvm_enabled))
|
|
1202 |
require_spindles=lvm_enabled))
|
|
1203 | 1203 |
for (uuid, nresult) in node_data.items() |
1204 | 1204 |
if not nresult.fail_msg and nresult.payload) |
1205 | 1205 |
else: |
Also available in: Unified diff