Revision c8c071cb src/Ganeti/HTools/Backend/Luxi.hs
b/src/Ganeti/HTools/Backend/Luxi.hs | ||
---|---|---|
117 | 117 |
queryNodesMsg = |
118 | 118 |
L.Query (Qlang.ItemTypeOpCode Qlang.QRNode) |
119 | 119 |
["name", "mtotal", "mnode", "mfree", "dtotal", "dfree", |
120 |
"ctotal", "offline", "drained", "vm_capable", |
|
120 |
"ctotal", "cnos", "offline", "drained", "vm_capable",
|
|
121 | 121 |
"ndp/spindle_count", "group.uuid", "tags", |
122 | 122 |
"ndp/exclusive_storage", "sptotal", "spfree"] Qlang.EmptyFilter |
123 | 123 |
|
... | ... | |
204 | 204 |
-- | Construct a node from a JSON object. |
205 | 205 |
parseNode :: NameAssoc -> [(JSValue, JSValue)] -> Result (String, Node.Node) |
206 | 206 |
parseNode ktg [ name, mtotal, mnode, mfree, dtotal, dfree |
207 |
, ctotal, offline, drained, vm_capable, spindles, g_uuid |
|
207 |
, ctotal, cnos, offline, drained, vm_capable, spindles, g_uuid
|
|
208 | 208 |
, tags, excl_stor, sptotal, spfree ] |
209 | 209 |
= do |
210 | 210 |
xname <- annotateResult "Parsing new node" (fromJValWithStatus name) |
... | ... | |
227 | 227 |
xdtotal <- lvconvert 0.0 "dtotal" dtotal |
228 | 228 |
xdfree <- lvconvert 0 "dfree" dfree |
229 | 229 |
xctotal <- lvconvert 0.0 "ctotal" ctotal |
230 |
xcnos <- lvconvert 0 "cnos" cnos |
|
230 | 231 |
let node = flip Node.setNodeTags xtags $ |
231 | 232 |
Node.create xname xmtotal xmnode xmfree xdtotal xdfree |
232 |
xctotal (not live) xsptotal xspfree xgdx xexcl_stor |
|
233 |
xctotal xcnos (not live) xsptotal xspfree xgdx xexcl_stor
|
|
233 | 234 |
return (xname, node) |
234 | 235 |
|
235 | 236 |
parseNode _ v = fail ("Invalid node query result: " ++ show v) |
Also available in: Unified diff