LGTM, thanks.

On Mon, Oct 7, 2013 at 4:37 PM, Jose A. Lopes <[email protected]> wrote:

> Add several groups of constants to the Haskell to Python constant
> generation.
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  lib/constants.py          | 27 +++++++++------------------
>  src/Ganeti/HsConstants.hs | 26 ++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+), 18 deletions(-)
>
> diff --git a/lib/constants.py b/lib/constants.py
> index 3a250ff..9f5d969 100644
> --- a/lib/constants.py
> +++ b/lib/constants.py
> @@ -445,6 +445,15 @@ NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
>  DISK_TRANSFER_CONNECT_TIMEOUT = _constants.DISK_TRANSFER_CONNECT_TIMEOUT
>  DISK_SEPARATOR = _constants.DISK_SEPARATOR
>  IP_COMMAND_PATH = _constants.IP_COMMAND_PATH
> +JOB_IDS_KEY = _constants.JOB_IDS_KEY
> +
> +RUNPARTS_SKIP = _constants.RUNPARTS_SKIP
> +RUNPARTS_RUN = _constants.RUNPARTS_RUN
> +RUNPARTS_ERR = _constants.RUNPARTS_ERR
> +RUNPARTS_STATUS = _constants.RUNPARTS_STATUS
> +
> +RPC_ENCODING_NONE = _constants.RPC_ENCODING_NONE
> +RPC_ENCODING_ZLIB_BASE64 = _constants.RPC_ENCODING_ZLIB_BASE64
>
>  RPC_TMO_URGENT = _constants.RPC_TMO_URGENT
>  RPC_TMO_FAST = _constants.RPC_TMO_FAST
> @@ -454,24 +463,6 @@ RPC_TMO_4HRS = _constants.RPC_TMO_4HRS
>  RPC_TMO_1DAY = _constants.RPC_TMO_1DAY
>  RPC_CONNECT_TIMEOUT = _constants.RPC_CONNECT_TIMEOUT
>
> -#: Key for job IDs in opcode result
> -JOB_IDS_KEY = "jobs"
> -
> -# runparts results
> -(RUNPARTS_SKIP,
> - RUNPARTS_RUN,
> - RUNPARTS_ERR) = range(3)
> -
> -RUNPARTS_STATUS = compat.UniqueFrozenset([
> -  RUNPARTS_SKIP,
> -  RUNPARTS_RUN,
> -  RUNPARTS_ERR,
> -  ])
> -
> -# RPC constants
> -(RPC_ENCODING_NONE,
> - RPC_ENCODING_ZLIB_BASE64) = range(2)
> -
>  # os related constants
>  OS_SCRIPT_CREATE = "create"
>  OS_SCRIPT_IMPORT = "import"
> diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs
> index a7a878b..eff332f 100644
> --- a/src/Ganeti/HsConstants.hs
> +++ b/src/Ganeti/HsConstants.hs
> @@ -1139,6 +1139,32 @@ diskTransferConnectTimeout = 60
>  diskSeparator :: String
>  diskSeparator = AutoConf.diskSeparator
>
> +-- | Key for job IDs in opcode result
> +jobIdsKey :: String
> +jobIdsKey = "jobs"
> +
> +-- * Runparts results
> +
> +runpartsErr :: Int
> +runpartsErr = 2
> +
> +runpartsRun :: Int
> +runpartsRun = 1
> +
> +runpartsSkip :: Int
> +runpartsSkip = 0
> +
> +runpartsStatus :: [Int]
> +runpartsStatus = [runpartsErr, runpartsRun, runpartsSkip]
> +
> +-- * RPC
> +
> +rpcEncodingNone :: Int
> +rpcEncodingNone = 0
> +
> +rpcEncodingZlibBase64 :: Int
> +rpcEncodingZlibBase64 = 1
> +
>  -- * Timeout table
>  --
>  -- Various time constants for the timeout table
> --
> 1.8.4
>
>


-- 
Thomas Thrainer | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to