Revision af5dd836 src/Ganeti/Config.hs

b/src/Ganeti/Config.hs
36 36
    , getMasterCandidates
37 37
    , getNode
38 38
    , getInstance
39
    , getDisk
39 40
    , getGroup
40 41
    , getGroupNdParams
41 42
    , getGroupIpolicy
......
132 133

  
133 134
-- | Get the list of master candidates.
134 135
getMasterCandidates :: ConfigData -> [Node]
135
getMasterCandidates cfg = 
136
getMasterCandidates cfg =
136 137
  filter ((==) NRCandidate . getNodeRole cfg)
137 138
    (map snd . M.toList . fromContainer . configNodes $ cfg)
138 139

  
......
194 195
                              (instName . (M.!) instances) instances
195 196
                in getItem "Instance" name by_name
196 197

  
198
-- | Looks up a disk by uuid.
199
getDisk :: ConfigData -> String -> ErrorResult Disk
200
getDisk cfg name =
201
  let disks = fromContainer (configDisks cfg)
202
  in getItem "Disk" name disks
203

  
197 204
-- | Looks up a node group by name or uuid.
198 205
getGroup :: ConfigData -> String -> ErrorResult NodeGroup
199 206
getGroup cfg name =
......
312 319
  pNode <- getInstPrimaryNode cfg name
313 320
  return . nub $ pNode:diskNodes
314 321

  
322
-- | Get disks for a given instance.
323
-- The instance is specified by name or uuid.
324
--getInstDisks :: ConfigData -> String -> ErrorResult [Disk]
325
--getInstDisks cfg iname = do
326
--  let inst = getInstance cfg iname
327
--  mapM (getDisk cfg) $ instDisks inst
328

  
315 329
-- | Filters DRBD minors for a given node.
316 330
getDrbdMinorsForNode :: String -> Disk -> [(Int, String)]
317 331
getDrbdMinorsForNode node disk =

Also available in: Unified diff