Revision 76a20994 htools/Ganeti/HTools/Types.hs

b/htools/Ganeti/HTools/Types.hs
41 41
  , instanceStatusFromRaw
42 42
  , instanceStatusToRaw
43 43
  , RSpec(..)
44
  , AllocInfo(..)
44 45
  , DynUtil(..)
45 46
  , zeroUtil
46 47
  , baseUtil
......
154 155
  , rspecDsk  :: Int  -- ^ Requested disk
155 156
  } deriving (Show, Read, Eq)
156 157

  
158
-- | Allocation stats type. This is used instead of 'RSpec' (which was
159
-- used at first), because we need to track more stats. The actual
160
-- data can refer either to allocated, or available, etc. values
161
-- depending on the context. See also
162
-- 'Cluster.computeAllocationDelta'.
163
data AllocInfo = AllocInfo
164
  { allocInfoVCpus :: Int    -- ^ VCPUs
165
  , allocInfoNCpus :: Double -- ^ Normalised CPUs
166
  , allocInfoMem   :: Int    -- ^ Memory
167
  , allocInfoDisk  :: Int    -- ^ Disk
168
  } deriving (Show, Read, Eq)
157 169

  
158 170
-- | Instance specification type.
159 171
$(THH.buildObject "ISpec" "iSpec"

Also available in: Unified diff