Revision 212b66c3 src/Ganeti/Rpc.hs
b/src/Ganeti/Rpc.hs | ||
---|---|---|
337 | 337 |
-- | NodeInfo |
338 | 338 |
-- Return node information. |
339 | 339 |
$(buildObject "RpcCallNodeInfo" "rpcCallNodeInfo" |
340 |
[ simpleField "storage_units" [t| [ (StorageType, String) ] |]
|
|
340 |
[ simpleField "storage_units" [t| Map.Map String [StorageUnit] |]
|
|
341 | 341 |
, simpleField "hypervisors" [t| [ (Hypervisor, HvParams) ] |] |
342 |
, simpleField "exclusive_storage" [t| Map.Map String Bool |] |
|
343 | 342 |
]) |
344 | 343 |
|
345 | 344 |
$(buildObject "StorageInfo" "storageInfo" |
... | ... | |
371 | 370 |
rpcCallTimeout _ = rpcTimeoutToRaw Urgent |
372 | 371 |
rpcCallAcceptOffline _ = False |
373 | 372 |
rpcCallData n call = J.encode |
374 |
( rpcCallNodeInfoStorageUnits call |
|
375 |
, rpcCallNodeInfoHypervisors call |
|
376 |
, fromMaybe (error $ "Programmer error: missing parameter for node named " |
|
373 |
( fromMaybe (error $ "Programmer error: missing parameter for node named " |
|
377 | 374 |
++ nodeName n) |
378 |
$ Map.lookup (nodeName n) (rpcCallNodeInfoExclusiveStorage call) |
|
375 |
$ Map.lookup (nodeUuid n) (rpcCallNodeInfoStorageUnits call) |
|
376 |
, rpcCallNodeInfoHypervisors call |
|
379 | 377 |
) |
380 | 378 |
|
381 | 379 |
instance Rpc RpcCallNodeInfo RpcResultNodeInfo where |
Also available in: Unified diff