Safe HaskellNone




Implementation of the Ganeti Query2 instance queries.



type Runtime = Either RpcError LiveInfo Source #

Runtime containing the LiveInfo. See the genericQuery function in the Query.hs file for an explanation of the terms used.

fieldsMap :: FieldMap Instance Runtime Source #

The instance fields map.

instanceAliases :: [(FieldName, FieldName)] Source #

The instance aliases.

Helper functions for node property retrieval

Various helper functions for property retrieval

Live fields functionality

Functionality related to status and operational status extraction

Helper functions extracting information as necessary for the generic query

getInstanceInfo :: [(String, ERpcError RpcResultAllInstancesInfo)] -> Instance -> ERpcError (Maybe (InstanceInfo, Bool)) Source #

Retrieves the instance information if it is present anywhere in the all instances RPC result. Notes if it originates from the primary node. An error is delivered if there is no result, and the primary node is down.

collectLiveData Source #


:: Bool

Live queries allowed

-> ConfigData

The cluster config

-> [String]

The requested fields

-> [Instance]

The instance objects

-> IO [(Instance, Runtime)] 

Collect live data from RPC query if enabled.