Revision a246ce76 src/Ganeti/Query/Node.hs
b/src/Ganeti/Query/Node.hs | ||
---|---|---|
36 | 36 |
import qualified Text.JSON as J |
37 | 37 |
|
38 | 38 |
import Ganeti.Config |
39 |
import Ganeti.Logging |
|
40 | 39 |
import Ganeti.Objects |
41 | 40 |
import Ganeti.JSON |
42 | 41 |
import Ganeti.Rpc |
... | ... | |
215 | 214 |
fieldsMap = |
216 | 215 |
Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) nodeFields |
217 | 216 |
|
218 |
-- | Scan the list of results produced by executeRpcCall and log all the RPC |
|
219 |
-- errors. |
|
220 |
logRpcErrors :: [(Node, Runtime)] -> IO () |
|
221 |
logRpcErrors allElems = |
|
222 |
let logOneRpcErr (_, Right _) = return () |
|
223 |
logOneRpcErr (_, Left err) = |
|
224 |
logError $ "Error in the RPC HTTP reply: " ++ show err |
|
225 |
in mapM_ logOneRpcErr allElems |
|
226 |
|
|
227 | 217 |
-- | Collect live data from RPC query if enabled. |
228 | 218 |
-- |
229 | 219 |
-- FIXME: Check which fields we actually need and possibly send empty |
Also available in: Unified diff