Revision 6c332a37
b/src/Ganeti/HTools/Backend/Rapi.hs | ||
---|---|---|
166 | 166 |
dtotal <- extract "dtotal" |
167 | 167 |
dfree <- extract "dfree" |
168 | 168 |
ctotal <- extract "ctotal" |
169 |
return $ Node.create name mtotal mnode mfree |
|
169 |
return $ Node.create name mtotal mnode mfree
|
|
170 | 170 |
dtotal dfree ctotal False spindles guuid' |
171 | 171 |
return (name, node) |
172 | 172 |
|
b/src/Ganeti/HTools/Node.hs | ||
---|---|---|
39 | 39 |
, setFmem |
40 | 40 |
, setPri |
41 | 41 |
, setSec |
42 |
, setMaster |
|
42 | 43 |
, setMdsk |
43 | 44 |
, setMcpu |
44 | 45 |
, setPolicy |
... | ... | |
130 | 131 |
, offline :: Bool -- ^ Whether the node should not be used for |
131 | 132 |
-- allocations and skipped from score |
132 | 133 |
-- computations |
134 |
, isMaster :: Bool -- ^ Whether the node is the master node |
|
133 | 135 |
, utilPool :: T.DynUtil -- ^ Total utilisation capacity |
134 | 136 |
, utilLoad :: T.DynUtil -- ^ Sum of instance utilisation |
135 | 137 |
, pTags :: TagMap -- ^ Primary instance exclusion tags and their count |
... | ... | |
235 | 237 |
, pRem = 0 |
236 | 238 |
, pCpu = 0 |
237 | 239 |
, offline = offline_init |
240 |
, isMaster = False |
|
238 | 241 |
, xMem = 0 |
239 | 242 |
, mDsk = T.defReservedDiskRatio |
240 | 243 |
, loDsk = mDskToloDsk T.defReservedDiskRatio dsk_t_init |
... | ... | |
277 | 280 |
setOffline :: Node -> Bool -> Node |
278 | 281 |
setOffline t val = t { offline = val } |
279 | 282 |
|
283 |
-- | Sets the master attribute |
|
284 |
setMaster :: Node -> Bool -> Node |
|
285 |
setMaster t val = t { isMaster = val } |
|
286 |
|
|
280 | 287 |
-- | Sets the unnaccounted memory. |
281 | 288 |
setXmem :: Node -> Int -> Node |
282 | 289 |
setXmem t val = t { xMem = val } |
Also available in: Unified diff