History | View | Annotate | Download (2.5 kB)
Stop exporting JSON functionality from Utils.hs
This completes the Utils/JSON split started in commit f047f90f. Theimport graph should be cleaner now.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Convert opcode TH code to the use of Field type
This makes more explicit the field behaviour - previously an optionalfield was detected via a "Maybe" constructor, and an optional one viaa "Just defval" one. With this, field behaviour become more explicit...
htools: reindent the rest of the files
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Use TemplateHaskell to generate opcode serialisation
This replaces the hand-coded opcode serialisation code withauto-generation based on TemplateHaskell.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Agata Murawska <agatamurawska@google.com>
Use TemplateHaskell to build the opID function
This replaces the hand-coded opID with one automatically generatedfrom the constructor names, similar to the way Python does it, exceptit's done at compilation time as opposed to runtime.
Again, the code line delta does not favour this patch, but this...
Use TemplateHaskell instead of hand-coded instances
This patch replaces the current hard-coded JSON instances (all alike,just manual conversion to/from string) with auto-generated code basedon Template Haskell(http://www.haskell.org/haskellwiki/Template_Haskell)....
htools: add target_node member to migrate opcode
… and failover too. Not many changes otherwise except forserialisation and unittests.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
htools: docstring fixes and improvements
No code changes (except one definition being moved around in QC.hs)are contained in this patch.
htools: Make opcode naming consistent with Ganeti codebase
This patch just cleans up the htools codebase to make it more consistentwith the naming of the Ganeti codebase.
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
OpCodes.hs: make allow_failover optional
And default to False, like in the Python codebase.
htools: Use OpMigrateInstance with allow_failover option
Before hbal decided on the fly if an instance is migratable or not. Aswe implemented failover fallback in commit d5cafd31456 we can start touse that.
Signed-off-by: René Nussbaumer <rn@google.com>...
Merge remote branch 'htools/master'