Revision 6c00b2c7 lib/cmdlib/node.py
b/lib/cmdlib/node.py | ||
---|---|---|
1205 | 1205 |
# filter out non-vm_capable nodes |
1206 | 1206 |
toquery_node_uuids = [node.uuid for node in all_info.values() |
1207 | 1207 |
if node.vm_capable and node.uuid in node_uuids] |
1208 |
lvm_enabled = utils.storage.IsLvmEnabled( |
|
1209 |
lu.cfg.GetClusterInfo().enabled_disk_templates) |
|
1210 |
# FIXME: this per default asks for storage space information for all |
|
1211 |
# enabled disk templates. Fix this by making it possible to specify |
|
1212 |
# space report fields for specific disk templates. |
|
1213 |
raw_storage_units = utils.storage.GetStorageUnitsOfCluster( |
|
1214 |
lu.cfg, include_spindles=lvm_enabled) |
|
1208 |
default_template = lu.cfg.GetClusterInfo().enabled_disk_templates[0] |
|
1209 |
raw_storage_units = utils.storage.GetStorageUnits( |
|
1210 |
lu.cfg, [default_template]) |
|
1215 | 1211 |
storage_units = rpc.PrepareStorageUnitsForNodes( |
1216 | 1212 |
lu.cfg, raw_storage_units, toquery_node_uuids) |
1217 | 1213 |
default_hypervisor = lu.cfg.GetHypervisorType() |
... | ... | |
1220 | 1216 |
node_data = lu.rpc.call_node_info(toquery_node_uuids, storage_units, |
1221 | 1217 |
hvspecs) |
1222 | 1218 |
live_data = dict( |
1223 |
(uuid, rpc.MakeLegacyNodeInfo(nresult.payload, |
|
1224 |
require_spindles=lvm_enabled)) |
|
1219 |
(uuid, rpc.MakeLegacyNodeInfo(nresult.payload, default_template)) |
|
1225 | 1220 |
for (uuid, nresult) in node_data.items() |
1226 | 1221 |
if not nresult.fail_msg and nresult.payload) |
1227 | 1222 |
else: |
Also available in: Unified diff