This is the first phase for adding Ganeti exceptions support: error
definition, serialisation, and conversion of Query path to proper
exceptions.

Due to future changes on the devel-2.6 branch, I didn't convert htools
themselves to read properly the job execution status; that will be
implemented later (including conversion of more code paths to
ErrorResult).

Iustin Pop (8):
  Cleanup HTools.Types/BasicTypes imports
  Generalise the Result type
  Remove custom OpResult type/monad
  Abstract a few types in THH.hs
  Abstract Luxi template functionality
  Add an Errors module mirroring the Python one
  Add exception utility functions
  Convert query path from string errors to GanetiException

 Makefile.am                            |    2 +
 htest/Test/Ganeti/BasicTypes.hs        |    2 +-
 htest/Test/Ganeti/Errors.hs            |   48 +++++++++
 htest/Test/Ganeti/HTools/CLI.hs        |    5 +-
 htest/Test/Ganeti/HTools/Cluster.hs    |   59 ++++++------
 htest/Test/Ganeti/HTools/Instance.hs   |   23 ++--
 htest/Test/Ganeti/HTools/Loader.hs     |    5 +-
 htest/Test/Ganeti/HTools/Node.hs       |   21 ++--
 htest/Test/Ganeti/HTools/Simu.hs       |    7 +-
 htest/Test/Ganeti/HTools/Text.hs       |   35 ++++---
 htest/Test/Ganeti/HTools/Types.hs      |   28 +++---
 htest/Test/Ganeti/JSON.hs              |    2 +-
 htest/Test/Ganeti/Query/Query.hs       |    7 +-
 htest/Test/Ganeti/TestCommon.hs        |    4 +-
 htest/Test/Ganeti/TestHTools.hs        |    5 -
 htest/Test/Ganeti/Utils.hs             |   26 +++--
 htest/test.hs                          |    2 +
 htools/Ganeti/BasicTypes.hs            |   71 ++++++++------
 htools/Ganeti/Confd/Server.hs          |   20 +++--
 htools/Ganeti/Config.hs                |   17 ++--
 htools/Ganeti/Errors.hs                |  171 +++++++++++++++++++++++++++++++
 htools/Ganeti/HTools/Cluster.hs        |   17 ++--
 htools/Ganeti/HTools/ExtLoader.hs      |    1 +
 htools/Ganeti/HTools/IAlloc.hs         |    1 +
 htools/Ganeti/HTools/Instance.hs       |   39 ++++----
 htools/Ganeti/HTools/Luxi.hs           |    1 +
 htools/Ganeti/HTools/Node.hs           |   31 +++---
 htools/Ganeti/HTools/Program/Hbal.hs   |    1 +
 htools/Ganeti/HTools/Program/Hscan.hs  |    2 +-
 htools/Ganeti/HTools/Program/Hspace.hs |    1 +
 htools/Ganeti/HTools/Rapi.hs           |    1 +
 htools/Ganeti/HTools/Simu.hs           |    1 +
 htools/Ganeti/HTools/Text.hs           |    1 +
 htools/Ganeti/HTools/Types.hs          |   28 ++---
 htools/Ganeti/Query/Filter.hs          |   31 ++++---
 htools/Ganeti/Query/Query.hs           |   20 ++--
 htools/Ganeti/Query/Server.hs          |   23 +++--
 htools/Ganeti/THH.hs                   |  174 ++++++++++++++++++++++++++++----
 38 files changed, 662 insertions(+), 271 deletions(-)
 create mode 100644 htest/Test/Ganeti/Errors.hs
 create mode 100644 htools/Ganeti/Errors.hs

-- 
1.7.7.3

Reply via email to