|
|
|
|
|
| Description |
Generic data loader.
This module holds the common code for parsing the input data after it
has been loaded from external sources.
|
|
| Synopsis |
|
|
|
|
| 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] | Choose a new secondary node
| | NodeEvacuate [Idx] EvacMode | node-evacuate mode
| | ChangeGroup [Gdx] [Idx] | Multi-relocate mode
|
|
|
|
|
| A complete request, as received from Ganeti.
| | Constructors | |
|
|
|
| The cluster state.
| | Constructors | | ClusterData | | | cdGroups :: List | The node group list
| | cdNodes :: List | The node list
| | cdInstances :: List | The instance list
| | cdTags :: [String] | The cluster tags
|
|
|
|
|
|
| The priority of a match in a lookup result.
| | Constructors | | ExactMatch | | | MultipleMatch | | | PartialMatch | | | FailMatch | |
|
|
|
|
| The result of a name lookup in a list.
| | Constructors | | LookupResult | | | lrMatchPriority :: MatchPriority | The result type
| Matching value (for ExactMatch, PartialMatch), Lookup string otherwise
| | lrContent :: String | |
|
|
|
|
|
| An empty cluster.
|
|
| Functions
|
|
|
| Lookups a node into an assoc list.
|
|
|
| Lookups an instance into an assoc list.
|
|
|
| Lookups a group into an assoc list.
|
|
|
| :: String | Lookup
| | -> String | Full name
| | -> Bool | Whether there is a prefix match
| | Check for prefix matches in names.
Implemented in Ganeti core utils.text.MatchNameComponent
as the regexp r^%s(..*)?$ % re.escape(key)
|
|
|
|
| Is the lookup priority a good one?
|
|
|
| Is the lookup result an actual match?
|
|
|
| :: String | Canonical (target) name
| | -> String | Partial (lookup) name
| | -> LookupResult | Result of the lookup
| | Compares a canonical name and a lookup string.
|
|
|
|
| :: String | Lookup key
| | -> String | String to compare to the lookup key
| | -> LookupResult | Previous result
| | -> LookupResult | New result
| | Lookup a string and choose the best result.
|
|
|
|
| :: [String] | List of keys
| | -> String | Lookup string
| | -> LookupResult | Result of the lookup
| | Find the canonical name for a lookup string in a list of names.
|
|
|
|
| Given a list of elements (and their names), assign indices to them.
|
|
|
| For each instance, add its index to its primary and secondary nodes.
|
|
|
| Remove non-selected tags from the exclusion list.
|
|
|
| :: [String] | Selected instances (if not empty)
| | -> [String] | Excluded instances
| | -> Instance | Target Instance
| | -> Instance | Target Instance with updated attribute
| | 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] | Selected instances (if not empty)
| | -> [String] | Excluded instances
| | -> ClusterData | Data from backends
| | -> Result ClusterData | Fixed cluster data
| | 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 |