Revision d286d795 src/Ganeti/Query/Network.hs

b/src/Ganeti/Query/Network.hs
27 27
  ( getGroupConnection
28 28
  , getNetworkUuid
29 29
  , instIsConnected
30
  , Runtime
31 30
  , fieldsMap
32
  , collectLiveData
33 31
  ) where
34 32

  
35
-- FIXME: everything except Runtime(..) and fieldsMap
33
-- FIXME: everything except fieldsMap
36 34
-- is only exported for testing.
37 35

  
38 36
import qualified Data.Map as Map
......
47 45
import Ganeti.Query.Types
48 46
import Ganeti.Types
49 47

  
50
-- | There is no actual runtime.
51
data Runtime = Runtime
52

  
53
networkFields :: FieldList Network Runtime
48
networkFields :: FieldList Network NoDataRuntime
54 49
networkFields =
55 50
  [ (FieldDefinition "name" "Network" QFTText "Name",
56 51
     FieldSimple (rsNormal . networkName), QffNormal)
......
98 93
  tagsFields
99 94

  
100 95
-- | The group fields map.
101
fieldsMap :: FieldMap Network Runtime
96
fieldsMap :: FieldMap Network NoDataRuntime
102 97
fieldsMap =
103 98
  Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) networkFields
104 99

  
......
177 172
  let addrs = getReservations (networkNetwork net)
178 173
              (fromMaybe "" $ networkExtReservations net)
179 174
  in rsNormal . intercalate ", " $ map show addrs
180

  
181
-- | Dummy function for collecting live data (which networks don't have).
182
collectLiveData :: Bool -> ConfigData -> [Network] -> IO [(Network, Runtime)]
183
collectLiveData _ _ = return . map (\n -> (n, Runtime))

Also available in: Unified diff