LGTM, thanks

On Thu, Mar 26, 2015 at 2:37 PM, 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> This is an ISpec for an instance with 0 resources. It can serve as a
> trivial
> lower bound where we have to provide one but do not actually care.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  test/hs/Test/Ganeti/TestHTools.hs | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/test/hs/Test/Ganeti/TestHTools.hs
> b/test/hs/Test/Ganeti/TestHTools.hs
> index c4a3b6a..2817f2e 100644
> --- a/test/hs/Test/Ganeti/TestHTools.hs
> +++ b/test/hs/Test/Ganeti/TestHTools.hs
> @@ -36,6 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
>
>  module Test.Ganeti.TestHTools
>    ( nullIPolicy
> +  , nullISpec
>    , defGroup
>    , defGroupList
>    , defGroupAssoc
> @@ -58,17 +59,21 @@ import qualified Ganeti.HTools.Types as Types
>
>  -- * Helpers
>
> +-- | An ISpec with 0 resources.
> +nullISpec :: Types.ISpec
> +nullISpec = Types.ISpec { Types.iSpecMemorySize = 0
> +                        , Types.iSpecCpuCount   = 0
> +                        , Types.iSpecDiskSize   = 0
> +                        , Types.iSpecDiskCount  = 0
> +                        , Types.iSpecNicCount   = 0
> +                        , Types.iSpecSpindleUse = 0
> +                        }
> +
>  -- | Null iPolicy, and by null we mean very liberal.
>  nullIPolicy :: Types.IPolicy
>  nullIPolicy = Types.IPolicy
>    { Types.iPolicyMinMaxISpecs = [Types.MinMaxISpecs
> -    { Types.minMaxISpecsMinSpec = Types.ISpec { Types.iSpecMemorySize = 0
> -                                              , Types.iSpecCpuCount   = 0
> -                                              , Types.iSpecDiskSize   = 0
> -                                              , Types.iSpecDiskCount  = 0
> -                                              , Types.iSpecNicCount   = 0
> -                                              , Types.iSpecSpindleUse = 0
> -                                              }
> +    { Types.minMaxISpecsMinSpec = nullISpec
>      , Types.minMaxISpecsMaxSpec = Types.ISpec
>        { Types.iSpecMemorySize = maxBound
>        , Types.iSpecCpuCount   = maxBound
> --
> 2.2.0.rc0.207.ga3a616c
>
>
Hrvoje Ribicic
Ganeti Engineering
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
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to