|
|
|
|
|
Description |
Module describing an instance.
The instance data type holds very few fields, the algorithm
intelligence is in the Node and Cluster modules.
|
|
Synopsis |
|
|
|
|
Type declarations
|
|
|
The instance type
| Constructors | Instance | | name :: String | The instance name
| mem :: Int | Memory of the instance
| dsk :: Int | Disk size of instance
| vcpus :: Int | Number of VCPUs
| running :: Bool | Is the instance running?
| runSt :: String | Original (text) run status
| pNode :: Ndx | Original primary node
| sNode :: Ndx | Original secondary node
| idx :: Idx | Internal index
| util :: DynUtil | Dynamic resource usage
| movable :: Bool | Can the instance be moved?
| tags :: [String] | List of instance tags
|
|
| Instances | |
|
|
|
Base memory unit.
|
|
|
Base disk unit.
|
|
|
Base vcpus unit.
|
|
runningStates :: [String] | Source |
|
Running instance states.
|
|
|
A simple name for the int, instance association list.
|
|
|
A simple name for an instance map.
|
|
Initialization
|
|
|
Create an instance.
Some parameters are not initialized by function, and must be set
later (via setIdx for example).
|
|
|
:: Instance | The original instance
| -> Idx | New index
| -> Instance | The modified instance
| Changes the index.
This is used only during the building of the data structures.
|
|
|
|
:: Instance | The original instance
| -> String | New name
| -> Instance | The modified instance
| Changes the name.
This is used only during the building of the data structures.
|
|
|
Update functions
|
|
|
:: Instance | the original instance
| -> Ndx | the new primary node
| -> Instance | the modified instance
| Changes the primary node of the instance.
|
|
|
|
:: Instance | the original instance
| -> Ndx | the new secondary node
| -> Instance | the modified instance
| Changes the secondary node of the instance.
|
|
|
|
:: Instance | the original instance
| -> Ndx | new primary node index
| -> Ndx | new secondary node index
| -> Instance | the modified instance
| Changes both nodes of the instance.
|
|
|
|
:: Instance | The original instance
| -> Bool | New movable flag
| -> Instance | The modified instance
|
|
|
|
Try to shrink the instance based on the reason why we can't
allocate it.
|
|
|
Return the spec of an instance.
|
|
Produced by Haddock version 2.4.2 |