Revision dde85e1e test/hs/Test/Ganeti/TestHTools.hs

b/test/hs/Test/Ganeti/TestHTools.hs
6 6

  
7 7
{-
8 8

  
9
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
9
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
10 10

  
11 11
This program is free software; you can redistribute it and/or modify
12 12
it under the terms of the GNU General Public License as published by
......
25 25

  
26 26
-}
27 27

  
28
module Test.Ganeti.TestHTools where
28
module Test.Ganeti.TestHTools
29
  ( nullIPolicy
30
  , defGroup
31
  , defGroupList
32
  , defGroupAssoc
33
  , createInstance
34
  , makeSmallCluster
35
  , setInstanceSmallerThanNode
36
  ) where
29 37

  
30 38
import qualified Data.Map as Map
31 39

  
......
71 79
  , Types.iPolicySpindleRatio = maxSpindleRatio
72 80
  }
73 81

  
82
-- | Default group definition.
74 83
defGroup :: Group.Group
75 84
defGroup = flip Group.setIdx 0 $
76 85
             Group.create "default" Types.defaultGroupID Types.AllocPreferred
77 86
                  nullIPolicy []
78 87

  
88
-- | Default group, as a (singleton) 'Group.List'.
79 89
defGroupList :: Group.List
80 90
defGroupList = Container.fromList [(Group.idx defGroup, defGroup)]
81 91

  
92
-- | Default group, as a string map.
82 93
defGroupAssoc :: Map.Map String Types.Gdx
83 94
defGroupAssoc = Map.singleton (Group.uuid defGroup) (Group.idx defGroup)
84 95

  

Also available in: Unified diff