Revision 981bb5cf htools/Ganeti/HTools/Instance.hs
b/htools/Ganeti/HTools/Instance.hs | ||
---|---|---|
79 | 79 |
, autoBalance :: Bool -- ^ Is the instance auto-balanced? |
80 | 80 |
, tags :: [String] -- ^ List of instance tags |
81 | 81 |
, diskTemplate :: T.DiskTemplate -- ^ The disk template of the instance |
82 |
, spindleUsage :: Int -- ^ The numbers of used spindles |
|
82 | 83 |
} deriving (Show, Read, Eq) |
83 | 84 |
|
84 | 85 |
instance T.Element Instance where |
... | ... | |
157 | 158 |
-- Some parameters are not initialized by function, and must be set |
158 | 159 |
-- later (via 'setIdx' for example). |
159 | 160 |
create :: String -> Int -> Int -> Int -> T.InstanceStatus |
160 |
-> [String] -> Bool -> T.Ndx -> T.Ndx -> T.DiskTemplate -> Instance |
|
161 |
-> [String] -> Bool -> T.Ndx -> T.Ndx -> T.DiskTemplate -> Int |
|
162 |
-> Instance |
|
161 | 163 |
create name_init mem_init dsk_init vcpus_init run_init tags_init |
162 |
auto_balance_init pn sn dt = |
|
164 |
auto_balance_init pn sn dt su =
|
|
163 | 165 |
Instance { name = name_init |
164 | 166 |
, alias = name_init |
165 | 167 |
, mem = mem_init |
... | ... | |
174 | 176 |
, movable = supportsMoves dt |
175 | 177 |
, autoBalance = auto_balance_init |
176 | 178 |
, diskTemplate = dt |
179 |
, spindleUsage = su |
|
177 | 180 |
} |
178 | 181 |
|
179 | 182 |
-- | Changes the index. |
Also available in: Unified diff