Revision 46cc1ab4 src/Ganeti/Query/Instance.hs

b/src/Ganeti/Query/Instance.hs
733 733
getAllConsoleParams :: ConfigData
734 734
                    -> [Instance]
735 735
                    -> ErrorResult [InstanceConsoleInfoParams]
736
getAllConsoleParams cfg instances = do
737
  pNodes <- mapM (getPrimaryNode cfg) instances
738
  let filledHvParams = map (getFilledInstHvParams [] cfg) instances
739
  filledBeParams <- mapM (getFilledInstBeParams cfg) instances
740
  return . map (\(i, n, h, b) -> InstanceConsoleInfoParams i n h b) $
741
    zip4 instances pNodes filledHvParams filledBeParams
736
getAllConsoleParams cfg = mapM $ \i ->
737
  InstanceConsoleInfoParams i
738
    <$> getPrimaryNode cfg i
739
    <*> pure (getFilledInstHvParams [] cfg i)
740
    <*> getFilledInstBeParams cfg i
742 741

  
743 742
-- | Compares two params according to their node, needed for grouping.
744 743
compareParamsByNode :: InstanceConsoleInfoParams

Also available in: Unified diff