Safe Haskell | None |
---|
Implementation of Utility functions for storage
Synopsis
- getDefaultStorageKey :: ConfigData -> DiskTemplate -> Maybe StorageKey
- getDefaultSpindleSU :: ConfigData -> (StorageType, Maybe StorageKey)
- getClusterStorageUnitRaws :: ConfigData -> [StorageUnitRaw]
- foldSUs :: [(StorageType, Maybe StorageKey)] -> [StorageUnitRaw]
- getExclusiveStorage :: ConfigData -> Node -> Maybe Bool
- hasExclusiveStorageFlag :: ConfigData -> Node -> Bool
- nodesWithValidConfig :: ConfigData -> [Node] -> [Node]
- getStorageUnitsOfNode :: ConfigData -> Node -> [StorageUnit]
Documentation
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