Revision 21839f47 htools/Ganeti/HTools/Program/Hail.hs

b/htools/Ganeti/HTools/Program/Hail.hs
4 4

  
5 5
{-
6 6

  
7
Copyright (C) 2009, 2010, 2011 Google Inc.
7
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
8 8

  
9 9
This program is free software; you can redistribute it and/or modify
10 10
it under the terms of the GNU General Public License as published by
......
23 23

  
24 24
-}
25 25

  
26
module Ganeti.HTools.Program.Hail (main) where
26
module Ganeti.HTools.Program.Hail (main, options) where
27 27

  
28 28
import Control.Monad
29 29
import Data.Maybe (fromMaybe)
30
import System.Environment (getArgs)
31 30
import System.IO
32 31

  
33 32
import qualified Ganeti.HTools.Cluster as Cluster
......
50 49
  ]
51 50

  
52 51
-- | Main function.
53
main :: IO ()
54
main = do
55
  cmd_args <- getArgs
56
  (opts, args) <- parseOpts cmd_args "hail" options
57

  
52
main :: Options -> [String] -> IO ()
53
main opts args = do
58 54
  let shownodes = optShowNodes opts
59 55
      verbose = optVerbose opts
60 56
      savecluster = optSaveCluster opts

Also available in: Unified diff