[RESEND with more tests and higher coverage]

I'm undecided about this patch series ☹ - feedback needed.

It's goal is to take advantage of the fact that htools can use “offline”
data files and thus doesn't need access to a live cluster. That it does
well.

The downside is that, not having a nice shell-level testing framework,
this is all done in a hackish way, and if the tests fail you can't do
anything except use "bash -x" and hope for the best.

Code coverage is awesome now:
 76% expressions used (9196/12021)
 52% boolean coverage (112/214)
      52% guards (64/121), 20 always True, 17 always False, 20 unevaluated
      50% 'if' conditions (45/90), 14 always True, 18 always False, 13 
unevaluated
     100% qualifiers (3/3)
 61% alternatives used (509/824)
 94% local declarations used (551/584)
 70% top-level declarations used (439/627)

Enjoy!

Iustin Pop (12):
  Extend the possible move types with FailoverToAny
  Fix Node_addPriFD test for arbitrary disk templates
  Abstract the secondary evac into a separate function
  Rename evacDrbdSecondaryInner to evacOneNodeInner
  Replace explicit case with 'either'
  Enable evacuation/relocation for shared storage
  Enable all disk templates in unit-tests
  Fix TLMigrateInstance use of IAllocator
  Add a helper function for mirrorType computations
  fixup! Extend the possible move types with FailoverToAny
  fixup! Fix Node_addPriFD test for arbitrary disk templates
  fixup! Replace explicit case with 'either'

 doc/iallocator.rst               |    8 ++-
 htools/Ganeti/HTools/Cluster.hs  |  126 +++++++++++++++++++++++++-------------
 htools/Ganeti/HTools/IAlloc.hs   |    2 +-
 htools/Ganeti/HTools/Instance.hs |    5 ++
 htools/Ganeti/HTools/QC.hs       |   30 +++++----
 htools/Ganeti/HTools/Types.hs    |    2 +
 lib/cmdlib.py                    |    4 +-
 7 files changed, 115 insertions(+), 62 deletions(-)

-- 
1.7.9.1

Reply via email to