Revision d286d795 src/Ganeti/Query/Group.hs

b/src/Ganeti/Query/Group.hs
24 24
-}
25 25

  
26 26
module Ganeti.Query.Group
27
  ( Runtime
28
  , fieldsMap
29
  , collectLiveData
30
  ) where
27
  (fieldsMap) where
31 28

  
32 29
import qualified Data.Map as Map
33 30

  
......
38 35
import Ganeti.Query.Types
39 36
import Ganeti.Utils (niceSort)
40 37

  
41
-- | There is no runtime.
42
data Runtime = Runtime
43

  
44
groupFields :: FieldList NodeGroup Runtime
38
groupFields :: FieldList NodeGroup NoDataRuntime
45 39
groupFields =
46 40
  [ (FieldDefinition "alloc_policy" "AllocPolicy" QFTText
47 41
       "Allocation policy for group",
......
89 83
  tagsFields
90 84

  
91 85
-- | The group fields map.
92
fieldsMap :: FieldMap NodeGroup Runtime
86
fieldsMap :: FieldMap NodeGroup NoDataRuntime
93 87
fieldsMap =
94 88
  Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) groupFields
95

  
96
-- | Dummy function for collecting live data (which groups don't have).
97
collectLiveData :: Bool -> ConfigData -> [NodeGroup]
98
                -> IO [(NodeGroup, Runtime)]
99
collectLiveData _ _ = return . map (\n -> (n, Runtime))

Also available in: Unified diff