Revision b45222ce Ganeti/HTools/Rapi.hs
b/Ganeti/HTools/Rapi.hs | ||
---|---|---|
98 | 98 |
name <- tryFromObj "Parsing new node" a "name" |
99 | 99 |
let extract s = tryFromObj ("Node '" ++ name ++ "'") a s |
100 | 100 |
offline <- extract "offline" |
101 |
node <- (if offline |
|
101 |
drained <- extract "drained" |
|
102 |
node <- (if offline || drained |
|
102 | 103 |
then return $ Node.create name 0 0 0 0 0 0 True |
103 | 104 |
else do |
104 |
drained <- extract "drained" |
|
105 | 105 |
mtotal <- extract "mtotal" |
106 | 106 |
mnode <- extract "mnode" |
107 | 107 |
mfree <- extract "mfree" |
... | ... | |
109 | 109 |
dfree <- extract "dfree" |
110 | 110 |
ctotal <- extract "ctotal" |
111 | 111 |
return $ Node.create name mtotal mnode mfree |
112 |
dtotal dfree ctotal (offline || drained))
|
|
112 |
dtotal dfree ctotal False)
|
|
113 | 113 |
return (name, node) |
114 | 114 |
|
115 | 115 |
-- | Builds the cluster data from an URL. |
Also available in: Unified diff