LGTM, thanks.

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

> Add some assorted constants to the Haskell to Python constant generation.
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  lib/constants.py          |  9 +++------
>  src/Ganeti/HsConstants.hs | 13 +++++++++++++
>  2 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/lib/constants.py b/lib/constants.py
> index f82390d..10bccf6 100644
> --- a/lib/constants.py
> +++ b/lib/constants.py
> @@ -1452,13 +1452,10 @@ IPOLICY_DEFAULTS = {
>    IPOLICY_SPINDLE_RATIO: 32.0,
>    }
>
> -MASTER_POOL_SIZE_DEFAULT = 10
> +MASTER_POOL_SIZE_DEFAULT = _constants.MASTER_POOL_SIZE_DEFAULT
>
> -# Exclusive storage:
> -# Error margin used to compare physical disks
> -PART_MARGIN = .01
> -# Space reserved when creating instance disks
> -PART_RESERVED = .02
> +PART_MARGIN = _constants.PART_MARGIN
> +PART_RESERVED = _constants.PART_RESERVED
>
>  CONFD_PROTOCOL_VERSION = _constants.CONFD_PROTOCOL_VERSION
>
> diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs
> index b301de5..c823b8d 100644
> --- a/src/Ganeti/HsConstants.hs
> +++ b/src/Ganeti/HsConstants.hs
> @@ -3450,6 +3450,19 @@ ispecsMinmaxDefaults =
>       (ConstantUtils.ispecNicCount, Types.iSpecNicCount Types.defMaxISpec),
>       (ConstantUtils.ispecSpindleUse, Types.iSpecSpindleUse
> Types.defMaxISpec)])]
>
> +masterPoolSizeDefault :: Int
> +masterPoolSizeDefault = 10
> +
> +-- * Exclusive storage
> +
> +-- | Error margin used to compare physical disks
> +partMargin :: Double
> +partMargin = 0.01
> +
> +-- | Space reserved when creating instance disks
> +partReserved :: Double
> +partReserved = 0.02
> +
>  -- * Confd
>
>  confdProtocolVersion :: Int
> --
> 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