1. 19 Sep, 2013 6 commits
  2. 18 Sep, 2013 5 commits
  3. 12 Sep, 2013 2 commits
    • Jose A. Lopes's avatar
      Add 'daemonsPorts' and related constants · 6dc0cb59
      Jose A. Lopes authored
      * add 'daemonsPorts' and related constants used in the construction of
        the 'Map' that maps each daemon to its corresponding protocol and
        port.  This breaks constant 'daemonsPortsGanetiNoded' which is
        automatically generated from the Python dictionary 'DAEMONS_PORTS'
      * replace reference from constant 'daemonsPortsGanetiNoded' to
        'defaultNodedPort' because constant 'daemonsPortsGanetiNoded' was a
        tuple containing the protocol and the port for node daemon, but only
        the port was needed.  And because this tuple was making Haskell to
        Python constant generation more difficult, it is preferable to
        replace this tuple with the actual port and use it directly, in
        module 'Ganeti.Rpc'
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    • Jose A. Lopes's avatar
      Haskell to Python constants: more constants · f361a6ee
      Jose A. Lopes authored
      * move several groups of constants, from Python to Haskell, which are
        currently being used in Haskell, including SSH and daemon related
        constants, policy allocation, blockdev driver manual (this is a
        single constant), auto repair related constants, and data collector
        version (also a single constant)
      * constant 'AUTO_REPAIR_ALL_RESULTS' is moved to Python and its type
        changes from '[String]' to 'FrozenSet String' in order to be
        consistent with the Python type
      * fix tests related to the constant 'autoRepairAllResults' (i.e., the
        Haskell version of 'AUTO_REPAIR_ALL_RESULTS') to reflect the type
      * update instances of 'FrozenSet'
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
  4. 11 Sep, 2013 1 commit
  5. 10 Sep, 2013 2 commits
  6. 29 Aug, 2013 2 commits
    • Jose A. Lopes's avatar
      Setup constant generation infrastructure · 1b2adaa6
      Jose A. Lopes authored
      Setup a transitional Haskell to Python constant generation
      infrastructure.  This infrastructure is transitional and Python
      constants will not be migrated to Haskell all at once.  Instead, some
      constants will be incrementally pulled from Python and moved to
      Haskell.  This is a list of the relevant modules in this
      * Ganeti.HsConstants: contains the Haskell constants that are used
        both in Haskell (once re-exported through Ganeti.Constants) and
        generated in Python
      * Ganety.Hs2Py.ListConstants: contains the list of Haskell constants
        to be generated in Python; these constants are defined in the
        previous module and the list is automatically generated by the
      * hs2py-constants: Haskell program that outputs the actual constant
        definitions in Python; this task cannot be performed by 'hs2py' just
        yet because this programs depends on the 'Constants' module. But
        once all the constants have migrated to Haskell, then
        'hs2py-constants' and 'hs2py' can be merged.
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • Jose A. Lopes's avatar
      Rename 'Constants.hs' to 'PyConstants.hs' · fec1fac1
      Jose A. Lopes authored
      Rename the generated 'Constants.hs' module, which contains the Haskell
      constants generated from Python, to 'PyConstants.hs' in order to
      eliminate duplicated constants in Haskell, a problem introduced by the
      Haskell to Python constant generation, and to circumvent a problem
      with import/export of Haskell modules.  Add a new module named
      'Constants.hs' which imports 'PyConstants.hs' and exports its names.
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  7. 05 Mar, 2013 1 commit
  8. 24 Dec, 2012 1 commit
  9. 24 Aug, 2012 1 commit
  10. 24 May, 2011 1 commit
    • Iustin Pop's avatar
      Implement conversion of Python constants to Haskell · d99d1e36
      Iustin Pop authored
      With the merge of the repositories, we can now auto-generate the code
      for Haskell constants from the Python code.
      Currently this only handles the basic types (strings and
      integers). Handling containers such as lists and dictionaries is only
      possible if we would use a parser such that we recognise the element
      names. We could extend the convert-constants script if that becomes
      necessary, right now I'm looking at just the simple constants such as
      Iallocator modes, instance states, etc.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>