There are various flags that influence the behavior of Ganeti's balancing algorithm. As they have been added over time, the accumulated as positional arguments to various functions bearing the risk that they are passed in wrong order (the type checker cannot distinguish between to expressions of type Bool). Hence move them into a data structure of its own, thus rendering the flags to named fields.
Klaus Aehlig (7): Inline last use of tryBalance and rename tryBalanceEx back Add a module for htools' algorithm parameters Add function to obtain algorithmic options from CLI options Add a constant with the default algorithmic options Pass algorithmic options as record and not positionally Remove checkMove Also internally in Cluster.hs pass options as record Makefile.am | 1 + src/Ganeti/HTools/AlgorithmParams.hs | 61 ++++++++++++++++++++++++++ src/Ganeti/HTools/Cluster.hs | 80 +++++++++++------------------------ src/Ganeti/HTools/Program/Hbal.hs | 31 +++++--------- src/Ganeti/HTools/Program/Hcheck.hs | 8 +--- src/Ganeti/HTools/Program/Hsqueeze.hs | 5 ++- test/hs/Test/Ganeti/HTools/Cluster.hs | 7 ++- 7 files changed, 108 insertions(+), 85 deletions(-) create mode 100644 src/Ganeti/HTools/AlgorithmParams.hs -- 2.0.0.526.g5318336
