diff --git a/test/hs/Test/Ganeti/TestCommon.hs b/test/hs/Test/Ganeti/TestCommon.hs index 91351b68b7396f7a56fd21b1abcbe76cf723699d..460476cfc4a5e7d05da42482b35b26549d62c277 100644 --- a/test/hs/Test/Ganeti/TestCommon.hs +++ b/test/hs/Test/Ganeti/TestCommon.hs @@ -23,7 +23,42 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -} -module Test.Ganeti.TestCommon where +module Test.Ganeti.TestCommon + ( maxMem + , maxDsk + , maxCpu + , maxVcpuRatio + , maxSpindleRatio + , maxNodes + , maxOpCodes + , (==?) + , (/=?) + , failTest + , passTest + , pythonCmd + , runPython + , checkPythonResult + , DNSChar(..) + , genName + , genFQDN + , genMaybe + , genTags + , genFields + , genUniquesList + , SmallRatio(..) + , genSet + , genIp4AddrStr + , genIp4Addr + , genIp4NetWithNetmask + , genIp4Net + , genIp6Addr + , genIp6Net + , netmask2NumHosts + , testSerialisation + , resultProp + , readTestData + , genSample + ) where import Control.Applicative import Control.Exception (catchJust) diff --git a/test/hs/Test/Ganeti/TestHTools.hs b/test/hs/Test/Ganeti/TestHTools.hs index 44b53c87a4bc28581a98b45ca720cec3ec6182e2..b27c34c0439ba9af268efeb40f5ca469dd5fb0fe 100644 --- a/test/hs/Test/Ganeti/TestHTools.hs +++ b/test/hs/Test/Ganeti/TestHTools.hs @@ -6,7 +6,7 @@ {- -Copyright (C) 2009, 2010, 2011, 2012 Google Inc. +Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -} -module Test.Ganeti.TestHTools where +module Test.Ganeti.TestHTools + ( nullIPolicy + , defGroup + , defGroupList + , defGroupAssoc + , createInstance + , makeSmallCluster + , setInstanceSmallerThanNode + ) where import qualified Data.Map as Map @@ -71,14 +79,17 @@ nullIPolicy = Types.IPolicy , Types.iPolicySpindleRatio = maxSpindleRatio } +-- | Default group definition. defGroup :: Group.Group defGroup = flip Group.setIdx 0 $ Group.create "default" Types.defaultGroupID Types.AllocPreferred nullIPolicy [] +-- | Default group, as a (singleton) 'Group.List'. defGroupList :: Group.List defGroupList = Container.fromList [(Group.idx defGroup, defGroup)] +-- | Default group, as a string map. defGroupAssoc :: Map.Map String Types.Gdx defGroupAssoc = Map.singleton (Group.uuid defGroup) (Group.idx defGroup)