dtotal <- extract "dtotal"
dfree <- extract "dfree"
ctotal <- extract "ctotal"
- return $ Node.create name mtotal mnode mfree
+ return $ Node.create name mtotal mnode mfree
dtotal dfree ctotal False spindles guuid'
return (name, node)
, setFmem
, setPri
, setSec
+ , setMaster
, setMdsk
, setMcpu
, setPolicy
, offline :: Bool -- ^ Whether the node should not be used for
-- allocations and skipped from score
-- computations
+ , isMaster :: Bool -- ^ Whether the node is the master node
, utilPool :: T.DynUtil -- ^ Total utilisation capacity
, utilLoad :: T.DynUtil -- ^ Sum of instance utilisation
, pTags :: TagMap -- ^ Primary instance exclusion tags and their count
, pRem = 0
, pCpu = 0
, offline = offline_init
+ , isMaster = False
, xMem = 0
, mDsk = T.defReservedDiskRatio
, loDsk = mDskToloDsk T.defReservedDiskRatio dsk_t_init
setOffline :: Node -> Bool -> Node
setOffline t val = t { offline = val }
+-- | Sets the master attribute
+setMaster :: Node -> Bool -> Node
+setMaster t val = t { isMaster = val }
+
-- | Sets the unnaccounted memory.
setXmem :: Node -> Int -> Node
setXmem t val = t { xMem = val }