Verify incoming RPCs against candidate map
From this patch on, incoming RPC calls are checked againstthe map of valid master candidate certificates. If no mapis present, the cluster is assumed to be inbootstrap/upgrade mode and compares the incoming call...
Use a data type when generating Python types of OpCodes
Currently they are generated only as Strings.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Refactor OpCodeDescriptor from a tuple to a data type
This greatly enhances code readability.
Also fix monadic types "Q ExpQ" [which is "Q (Q Exp)"] to "Q Exp".
Rename PyValueInstances.hs to PyValue.hs
Now the file contains the type class declaration as well.
Move Haskell constants to proper module
Move Haskell constants from module 'Ganeti.HsConstants', which was atransitional module part of the Haskell to Python constant generationinfrastructure, to module 'Ganeti.Constants'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Add 'generated from' comments in Hs2py constants
Modify Hs2Py constants to include a comment in the generated commentsdescribing the source of those constants. Fixes issue 588.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Fix module documentation
Fix 'Ganeti.Hs2Py.ListContants.hs.in' template module documentation towarn about automatic module generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Setup constant generation infrastructure
Setup a transitional Haskell to Python constant generationinfrastructure. This infrastructure is transitional and Pythonconstants will not be migrated to Haskell all at once. Instead, someconstants will be incrementally pulled from Python and moved to...
Add Template Haskell code for constant generation
Add Template Haskell functions that generate a list in Haskellcontaining all the constants to be generated in Python. This list isan association list mapping the constant name to its Python value,which is stored as a string....
Generate Python opcodes from opcode descriptors
Add Haskell module Hs2Py which contains the helper functions thatgenerate the Python opcodes as strings from the Haskell opcodedescriptors produced by Template Haskell.
Add opcode documentation
Add Haskell module containing opcode documentation for all theopcodes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>