LGTM, thanks.

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

> Add UID pool related constants to the Haskell to Python constant
> generation.
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  lib/constants.py               |  5 ++---
>  src/Ganeti/HsConstants.hs      | 10 ++++++++++
>  src/Ganeti/PyValueInstances.hs |  1 +
>  3 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/lib/constants.py b/lib/constants.py
> index bb1a373..0849fa5 100644
> --- a/lib/constants.py
> +++ b/lib/constants.py
> @@ -1479,9 +1479,8 @@ CONFD_CLIENT_EXPIRE_TIMEOUT =
> _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
>
>  MAX_UDP_DATA_SIZE = _constants.MAX_UDP_DATA_SIZE
>
> -# User-id pool minimum/maximum acceptable user-ids.
> -UIDPOOL_UID_MIN = 0
> -UIDPOOL_UID_MAX = 2 ** 32 - 1 # Assuming 32 bit user-ids
> +UIDPOOL_UID_MIN = _constants.UIDPOOL_UID_MIN
> +UIDPOOL_UID_MAX = _constants.UIDPOOL_UID_MAX
>
>  # Name or path of the pgrep command
>  PGREP = "pgrep"
> diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs
> index 7a8c776..bed0f42 100644
> --- a/src/Ganeti/HsConstants.hs
> +++ b/src/Ganeti/HsConstants.hs
> @@ -1,3 +1,4 @@
> +{-# OPTIONS -fno-warn-type-defaults #-}
>  {-| HsConstants contains the Haskell constants
>
>  This is a transitional module complementary to 'Ganeti.Constants'.  It
> @@ -3623,6 +3624,15 @@ confdClientExpireTimeout = 10
>  maxUdpDataSize :: Int
>  maxUdpDataSize = 61440
>
> +-- * User-id pool minimum/maximum acceptable user-ids
> +
> +uidpoolUidMin :: Int
> +uidpoolUidMin = 0
> +
> +-- | Assuming 32 bit user-ids
> +uidpoolUidMax :: Integer
> +uidpoolUidMax = 2 ^ 32 - 1
> +
>  -- * Possible values for NodeGroup.alloc_policy
>
>  allocPolicyLastResort :: String
> diff --git a/src/Ganeti/PyValueInstances.hs
> b/src/Ganeti/PyValueInstances.hs
> index 24bc6d5..0e203c3 100644
> --- a/src/Ganeti/PyValueInstances.hs
> +++ b/src/Ganeti/PyValueInstances.hs
> @@ -42,6 +42,7 @@ import Ganeti.THH
>
>  instance PyValue Bool
>  instance PyValue Int
> +instance PyValue Integer
>  instance PyValue Double
>  instance PyValue Char
>
> --
> 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