projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix loading of plain instances via iallocator
[ganeti-local]
/
Ganeti
/
HTools
/
Rapi.hs
diff --git
a/Ganeti/HTools/Rapi.hs
b/Ganeti/HTools/Rapi.hs
index
ac0ff44
..
5f028c3
100644
(file)
--- a/
Ganeti/HTools/Rapi.hs
+++ b/
Ganeti/HTools/Rapi.hs
@@
-83,9
+83,8
@@
parseNode a = do
dtotal dfree (offline || drained))
return (name, node)
dtotal dfree (offline || drained))
return (name, node)
-loadData :: String -- ^ Cluster/URL to use as source
- -> IO (Result (NameAssoc, Node.AssocList,
- NameAssoc, Instance.AssocList))
+loadData :: String -- ^ Cluster or URL to use as source
+ -> IO (Result (Node.AssocList, Instance.AssocList))
loadData master = do -- IO monad
let url = formatHost master
node_body <- getUrl $ printf "%s/2/nodes?bulk=1" url
loadData master = do -- IO monad
let url = formatHost master
node_body <- getUrl $ printf "%s/2/nodes?bulk=1" url
@@
-94,5
+93,5
@@
loadData master = do -- IO monad
node_data <- node_body >>= getNodes
let (node_names, node_idx) = assignIndices node_data
inst_data <- inst_body >>= getInstances node_names
node_data <- node_body >>= getNodes
let (node_names, node_idx) = assignIndices node_data
inst_data <- inst_body >>= getInstances node_names
- let (inst_names, inst_idx) = assignIndices inst_data
- return (node_names, node_idx, inst_names, inst_idx)
+ let (_, inst_idx) = assignIndices inst_data
+ return (node_idx, inst_idx)