Revision 6e75a445
b/Ganeti/HTools/Node.hs | ||
---|---|---|
201 | 201 |
setSec :: Node -> Int -> Node |
202 | 202 |
setSec t idx = t { slist = idx:(slist t) } |
203 | 203 |
|
204 |
-- | Simple converter to string. |
|
205 |
str :: Node -> String |
|
206 |
str t = |
|
207 |
printf ("Node %d (mem=%5d MiB, disk=%5.2f GiB)\n Primaries:" ++ |
|
208 |
" %s\nSecondaries: %s") |
|
209 |
(idx t) (f_mem t) ((f_dsk t) `div` 1024) |
|
210 |
(commaJoin (map show (plist t))) |
|
211 |
(commaJoin (map show (slist t))) |
|
212 |
|
|
213 | 204 |
-- | String converter for the node list functionality. |
214 | 205 |
list :: Int -> String -> Node -> String |
215 | 206 |
list mname n t = |
Also available in: Unified diff