Revision c32c4e4d src/Ganeti/HTools/Program/Hail.hs

b/src/Ganeti/HTools/Program/Hail.hs
39 39
import Ganeti.HTools.CLI
40 40
import Ganeti.HTools.Backend.IAlloc
41 41
import Ganeti.HTools.Loader (Request(..), ClusterData(..))
42
import Ganeti.HTools.ExtLoader (maybeSaveData, loadExternalData)
42
import Ganeti.HTools.ExtLoader (maybeSaveData, loadExternalData
43
                               , queryAllMonDDCs)
43 44
import Ganeti.Utils
44 45

  
45 46
-- | Options list and functions.
......
51 52
    , oDataFile
52 53
    , oNodeSim
53 54
    , oVerbose
55
    , oIgnoreDyn
56
    , oMonD
54 57
    ]
55 58

  
56 59
-- | The list of arguments supported by the program.
......
69 72
      cdata <- loadExternalData opts
70 73
      let Request rqt _ = r1
71 74
      return $ Request rqt cdata
72
    else return r1
73

  
75
    else do
76
      let Request rqt cdata = r1
77
      cdata' <-
78
        if optMonD opts then queryAllMonDDCs cdata opts else return cdata
79
      return $ Request rqt cdata'
74 80

  
75 81
-- | Main function.
76 82
main :: Options -> [String] -> IO ()

Also available in: Unified diff