|
|
|
|
|
| Description |
Generic data loader
This module holds the common code for parsing the input data after it
has been loaded from external sources.
|
|
| Synopsis |
|
| exTagsPrefix :: String | | | | | data Request = Request RqType List List [String] | | | lookupNode :: Monad m => [(String, Ndx)] -> String -> String -> m Ndx | | | lookupInstance :: Monad m => [(String, Idx)] -> String -> m Idx | | | assignIndices :: Element a => [(String, a)] -> (NameAssoc, [(Int, a)]) | | | assocEqual :: Eq a => (a, b) -> (a, b) -> Bool | | | fixNodes :: [(Ndx, Node)] -> Instance -> [(Ndx, Node)] | | | filterExTags :: [String] -> Instance -> Instance | | | updateMovable :: [String] -> Instance -> Instance | | | longestDomain :: [String] -> String | | | extractExTags :: [String] -> [String] | | | commonSuffix :: List -> List -> String | | | mergeData :: [(String, DynUtil)] -> [String] -> [String] -> (AssocList, AssocList, [String]) -> Result (List, List, [String]) | | | checkData :: List -> List -> ([String], List) | | | nodeImem :: Node -> List -> Int | | | nodeIdsk :: Node -> List -> Int |
|
|
|
| Constants
|
|
|
| The exclusion tag prefix
|
|
| Types
|
|
|
The iallocator request type.
This type denotes what request we got from Ganeti and also holds
request-specific fields.
| | Constructors | | Allocate Instance Int | A new instance allocation
| | Relocate Idx Int [Ndx] | Move an instance to a new
secondary node
| | Evacuate [Ndx] | Evacuate nodes
|
|
|
|
|
| A complete request, as received from Ganeti.
| | Constructors | |
|
|
| Functions
|
|
| lookupNode :: Monad m => [(String, Ndx)] -> String -> String -> m Ndx | Source |
|
| Lookups a node into an assoc list.
|
|
| lookupInstance :: Monad m => [(String, Idx)] -> String -> m Idx | Source |
|
| Lookups an instance into an assoc list.
|
|
|
| Given a list of elements (and their names), assign indices to them.
|
|
| assocEqual :: Eq a => (a, b) -> (a, b) -> Bool | Source |
|
| Assoc element comparator
|
|
|
| For each instance, add its index to its primary and secondary nodes.
|
|
|
| Remove non-selected tags from the exclusion list
|
|
|
| Update the movable attribute
|
|
| longestDomain :: [String] -> String | Source |
|
| Compute the longest common suffix of a list of strings that
| starts with a dot.
|
|
| extractExTags :: [String] -> [String] | Source |
|
| Extracts the exclusion tags from the cluster configuration
|
|
|
| Extracts the common suffix from node/instance names
|
|
|
| :: [(String, DynUtil)] | Instance utilisation data
| | -> [String] | Exclusion tags
| | -> [String] | Untouchable instances
| | -> (AssocList, AssocList, [String]) | Data from backends
| | -> Result (List, List, [String]) | | | Initializer function that loads the data from a node and instance
list and massages it into the correct format.
|
|
|
|
| Checks the cluster data for consistency.
|
|
|
| Compute the amount of memory used by primary instances on a node.
|
|
|
| Compute the amount of disk used by instances on a node (either primary
or secondary).
|
|
| Produced by Haddock version 2.6.0 |