Revision 9dcec001 hail.hs
b/hail.hs | ||
---|---|---|
44 | 44 |
import Ganeti.HTools.IAlloc |
45 | 45 |
import Ganeti.HTools.Types |
46 | 46 |
import Ganeti.HTools.Loader (RqType(..), Request(..)) |
47 |
import Ganeti.HTools.Utils |
|
47 | 48 |
|
48 | 49 |
-- | Command line options structure. |
49 | 50 |
data Options = Options |
... | ... | |
74 | 75 |
] |
75 | 76 |
|
76 | 77 |
|
77 |
filterFails :: (Monad m) => [(Maybe Node.List, [Node.Node])] |
|
78 |
filterFails :: (Monad m) => [(Maybe Node.List, Instance.Instance, [Node.Node])]
|
|
78 | 79 |
-> m [(Node.List, [Node.Node])] |
79 | 80 |
filterFails sols = |
80 | 81 |
if null sols then fail "No nodes onto which to allocate at all" |
81 |
else let sols' = filter (isJust . fst) sols |
|
82 |
else let sols' = filter (isJust . fst3) sols
|
|
82 | 83 |
in if null sols' then |
83 | 84 |
fail "No valid allocation solutions" |
84 | 85 |
else |
85 |
return $ map (\(x, y) -> (fromJust x, y)) sols' |
|
86 |
return $ map (\(x, _, y) -> (fromJust x, y)) sols'
|
|
86 | 87 |
|
87 | 88 |
processResults :: (Monad m) => [(Node.List, [Node.Node])] |
88 | 89 |
-> m (String, [Node.Node]) |
Also available in: Unified diff