Revision 21839f47 htools/Ganeti/HTools/Program/Hscan.hs
b/htools/Ganeti/HTools/Program/Hscan.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.Hscan (main) where |
|
26 |
module Ganeti.HTools.Program.Hscan (main, options) where
|
|
27 | 27 |
|
28 | 28 |
import Control.Monad |
29 | 29 |
import Data.Maybe (isJust, fromJust, fromMaybe) |
... | ... | |
125 | 125 |
return True |
126 | 126 |
|
127 | 127 |
-- | Main function. |
128 |
main :: IO () |
|
129 |
main = do |
|
130 |
cmd_args <- getArgs |
|
131 |
(opts, clusters) <- parseOpts cmd_args "hscan" options |
|
128 |
main :: Options -> [String] -> IO () |
|
129 |
main opts clusters = do |
|
132 | 130 |
let local = "LOCAL" |
133 | 131 |
|
134 | 132 |
let nlen = if null clusters |
Also available in: Unified diff