Revision c2fe6008 src/Ganeti/Query/Node.hs
b/src/Ganeti/Query/Node.hs | ||
---|---|---|
279 | 279 |
rpcres <- executeRpcCall good_nodes (RpcCallNodeInfo storage_units hvs) |
280 | 280 |
return $ fillUpList (fillPairFromMaybe rpcResultNodeBroken pickPairUnique) |
281 | 281 |
nodes rpcres |
282 |
|
|
283 |
-- | Looks up the default hypervisor and it's hvparams |
|
284 |
getDefaultHypervisorSpec :: ConfigData -> (Hypervisor, HvParams) |
|
285 |
getDefaultHypervisorSpec cfg = (hv, getHvParamsFromCluster cfg hv) |
|
286 |
where hv = getDefaultHypervisor cfg |
|
287 |
|
|
288 |
-- | Looks up the cluster's hvparams of the given hypervisor |
|
289 |
getHvParamsFromCluster :: ConfigData -> Hypervisor -> HvParams |
|
290 |
getHvParamsFromCluster cfg hv = |
|
291 |
fromMaybe (GenericContainer (Map.fromList [])) |
|
292 |
(Map.lookup (hypervisorToRaw hv) |
|
293 |
(fromContainer (clusterHvparams (configCluster cfg)))) |
Also available in: Unified diff