Revision dde85e1e
b/test/hs/Test/Ganeti/TestCommon.hs | ||
---|---|---|
23 | 23 |
|
24 | 24 |
-} |
25 | 25 |
|
26 |
module Test.Ganeti.TestCommon where |
|
26 |
module Test.Ganeti.TestCommon |
|
27 |
( maxMem |
|
28 |
, maxDsk |
|
29 |
, maxCpu |
|
30 |
, maxVcpuRatio |
|
31 |
, maxSpindleRatio |
|
32 |
, maxNodes |
|
33 |
, maxOpCodes |
|
34 |
, (==?) |
|
35 |
, (/=?) |
|
36 |
, failTest |
|
37 |
, passTest |
|
38 |
, pythonCmd |
|
39 |
, runPython |
|
40 |
, checkPythonResult |
|
41 |
, DNSChar(..) |
|
42 |
, genName |
|
43 |
, genFQDN |
|
44 |
, genMaybe |
|
45 |
, genTags |
|
46 |
, genFields |
|
47 |
, genUniquesList |
|
48 |
, SmallRatio(..) |
|
49 |
, genSet |
|
50 |
, genIp4AddrStr |
|
51 |
, genIp4Addr |
|
52 |
, genIp4NetWithNetmask |
|
53 |
, genIp4Net |
|
54 |
, genIp6Addr |
|
55 |
, genIp6Net |
|
56 |
, netmask2NumHosts |
|
57 |
, testSerialisation |
|
58 |
, resultProp |
|
59 |
, readTestData |
|
60 |
, genSample |
|
61 |
) where |
|
27 | 62 |
|
28 | 63 |
import Control.Applicative |
29 | 64 |
import Control.Exception (catchJust) |
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