History | View | Annotate | Download (4.9 kB)
JSON functions: change signature of (maybe)fromObj
Currently, fromObj/maybeFromObj take first the key, and then theobject. This is suboptimal, as this form is not easy to use withpartial functional application.
To make it easier to switch between tryFromObj, fromObj and...
Add 'Read' instances for most objects
This allows a cluster structure to be easily serialized via "read";together with the already existing instances of Show, this gives apoor man's serialization/deserialization implementation.
The patch also exports the compDetailedCV function from Cluster.hs, so...
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...
Fix unused imports for ghc 6.12
GHC 6.12 has become more picky about unused imports, so we need toremove/tighten some of them.
Change the Utils.fromObj signature
Currently the fromObj function takes a JSON object which is thenconverted into a list of (String, JSValue) in which we make a lookup.However, most of the callers of this function call it repeatedly on thesame object, which means we do the object→list conversion repeatedly....
Add a small implementation of OpCodes
These are just a few opcodes we need for executing instance moves.