projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop RAPI v1 compatiblity
[ganeti-local]
/
Ganeti
/
HTools
/
Cluster.hs
diff --git
a/Ganeti/HTools/Cluster.hs
b/Ganeti/HTools/Cluster.hs
index
2474fa4
..
e3753cc
100644
(file)
--- a/
Ganeti/HTools/Cluster.hs
+++ b/
Ganeti/HTools/Cluster.hs
@@
-15,6
+15,7
@@
module Ganeti.HTools.Cluster
, Solution(..)
, Table(..)
, Removal
, Solution(..)
, Table(..)
, Removal
+ , Score
-- * Generic functions
, totalResources
-- * First phase functions
-- * Generic functions
, totalResources
-- * First phase functions
@@
-752,10
+753,14
@@
loadData ndata idata =
let
{- node file: name t_mem n_mem f_mem t_disk f_disk -}
(ktn, nl) = loadTabular ndata
let
{- node file: name t_mem n_mem f_mem t_disk f_disk -}
(ktn, nl) = loadTabular ndata
- (\ (name:tm:nm:fm:td:fd:[]) ->
+ (\ (name:tm:nm:fm:td:fd:fo:[]) ->
(name,
(name,
- Node.create (read tm) (read nm)
- (read fm) (read td) (read fd)))
+ if any (== "?") [tm,nm,fm,td,fd] || fo == "Y" then
+ Node.create 0 0 0 0 0 True
+ else
+ Node.create (read tm) (read nm) (read fm)
+ (read td) (read fd) False
+ ))
Node.setIdx
{- instance file: name mem disk status pnode snode -}
(kti, il) = loadTabular idata
Node.setIdx
{- instance file: name mem disk status pnode snode -}
(kti, il) = loadTabular idata