ganeti-htoolsSource codeContentsIndex
Ganeti.HTools.QC
Contents
Constants
Helper functions
Arbitrary instances
Actual tests
Description
Unittests for ganeti-htools
Synopsis
maxMem :: Int
maxDsk :: Int
maxCpu :: Int
defGroup :: Group
defGroupList :: List
defGroupAssoc :: Map String Gdx
isFailure :: OpResult a -> Bool
makeSmallCluster :: Node -> Int -> List
isNodeBig :: Node -> Int -> Bool
canBalance :: Table -> Bool -> Bool -> Bool
assignInstance :: List -> List -> Instance -> Idx -> Idx -> (List, List)
newtype DNSChar = DNSChar {
dnsGetChar :: Char
}
getName :: Gen String
getFQDN :: Gen String
newtype SmallRatio = SmallRatio Double
Constants
maxMem :: IntSource
Maximum memory (1TiB, somewhat random value)
maxDsk :: IntSource
Maximum disk (8TiB, somewhat random value)
maxCpu :: IntSource
Max CPUs (1024, somewhat random value)
defGroup :: GroupSource
defGroupList :: ListSource
defGroupAssoc :: Map String GdxSource
Helper functions
isFailure :: OpResult a -> BoolSource
Simple checker for whether OpResult is fail or pass
makeSmallCluster :: Node -> Int -> ListSource

Update an instance to be smaller than a node

Create an instance given its spec

Create a small cluster by repeating a node spec

isNodeBig :: Node -> Int -> BoolSource
Checks if a node is big enough
canBalance :: Table -> Bool -> Bool -> BoolSource
assignInstance :: List -> List -> Instance -> Idx -> Idx -> (List, List)Source
Assigns a new fresh instance to a cluster; this is not allocation, so no resource checks are done
Arbitrary instances
newtype DNSChar Source
Constructors
DNSChar
dnsGetChar :: Char
getName :: Gen StringSource
getFQDN :: Gen StringSource
Actual tests
newtype SmallRatio Source

Make sure add is idempotent

Make sure remove is idempotent

Make sure a missing item returns 0

Make sure an added item is found

Manual check that maxElem returns the maximum indeed, or 0 for null

Check that an instance add with too high memory or disk will be rejected

Check that an instance add with too high memory or disk will be rejected

Constructors
SmallRatio Double
Produced by Haddock version 2.6.0