Introduce OpCode unittests
Introduce suport for optional keys in JObjects
Some keys are optional in the Ganeti opcodes (e.g. ‘node’ in theOpReplaceDisks), and as such we need to transform them in a Maybe value,instead of failing.
The patch reworks a bit fromObj and adds maybeFromObj which parses such...
Replace fromJResult with annotateJResult
This patch removes all old uses of fromJResult with the annotatedversion, and removes the non-annotated version. All JSON parsing pointsshould now have annotated errors.
Add annotations to loadJSArray
This allows, for example, the RAPI backend to detail which information(instance or node data) fails to parse.
Change fromObj error messages
Currently fromObj doesn't detail what we're trying to read, which canlead to cryptic messages: "Cannot read Int". The patch changes thisfunction to annotate the error messages with the key/value we're tryingto convert, by using a new version of fromJResult....
A few more small Node unit-tests
Add more unittests
Instance, Node and Text modules have improved coverage.
Add more unit tests for allocation/balance
The patch adds some simple unit-tests for both the allocation function(we can allocate small instances on an empty cluster, we can allocate intiered more starting from any size) and the balancing functions (one...
Move two functions from hspace to Cluster.hs
This is done so we can test a longer pipeline.
Make CStats instance of show
This helps debugging via ghci.
View revisions
Also available in: Atom