Safe HaskellNone



Implementation of Utility functions for storage



getDefaultStorageKey :: ConfigData -> DiskTemplate -> Maybe StorageKey Source #

Get the cluster's default storage unit for a given disk template

getDefaultSpindleSU :: ConfigData -> (StorageType, Maybe StorageKey) Source #

Get the cluster's default spindle storage unit

getClusterStorageUnitRaws :: ConfigData -> [StorageUnitRaw] Source #

Get the cluster's storage units from the configuration

foldSUs :: [(StorageType, Maybe StorageKey)] -> [StorageUnitRaw] Source #

fold the storage unit list by sorting out the ones without keys

getExclusiveStorage :: ConfigData -> Node -> Maybe Bool Source #

Gets the value of the 'exclusive storage' flag of the node

hasExclusiveStorageFlag :: ConfigData -> Node -> Bool Source #

Determines whether a node's config contains an 'exclusive storage' flag

nodesWithValidConfig :: ConfigData -> [Node] -> [Node] Source #

Filter for nodes with a valid config

getStorageUnitsOfNode :: ConfigData -> Node -> [StorageUnit] Source #

Get the storage units of the node