Revision e4491427 htools/Ganeti/HTools/Cluster.hs
b/htools/Ganeti/HTools/Cluster.hs | ||
---|---|---|
638 | 638 |
-> Result AllocNodes -- ^ The (monadic) result |
639 | 639 |
genAllocNodes gl nl count drop_unalloc = |
640 | 640 |
let filter_fn = if drop_unalloc |
641 |
then filter ((/=) AllocUnallocable . Group.allocPolicy .
|
|
642 |
flip Container.find gl . Node.group)
|
|
641 |
then filter (Group.isAllocable .
|
|
642 |
flip Container.find gl . Node.group) |
|
643 | 643 |
else id |
644 | 644 |
all_nodes = filter_fn $ getOnline nl |
645 | 645 |
all_pairs = liftM2 (,) all_nodes all_nodes |
Also available in: Unified diff