ganeti
Safe HaskellNone

Ganeti.Query.Export

Description

Implementation of the Ganeti Query2 export queries.

Synopsis

Documentation

type Runtime = ResultEntry Source #

The parsed result of the ExportList. This is a bit tricky, in that we already do parsing of the results in the RPC calls, so the runtime type is a plain ResultEntry, as we have just one type.

rpcErrToRs :: RpcError -> ResultEntry Source #

Small helper for rpc to rs.

rpcExtractor :: Node -> Either RpcError RpcResultExportList -> [(Node, ResultEntry)] Source #

Helper for extracting fields from RPC result.

exportFields :: FieldList Node Runtime Source #

List of all node fields.

fieldsMap :: FieldMap Node Runtime Source #

The node fields map.

collectLiveData :: Bool -> ConfigData -> [Node] -> IO [(Node, Runtime)] Source #

Collect live data from RPC query if enabled.

Note that this function is "funny": the returned rows will not be 1:1 with the input, as nodes without exports will be pruned, whereas nodes with multiple exports will be listed multiple times.