Program.hs 1.84 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-| Small module holding program definitions.

-}

{-

Copyright (C) 2011, 2012 Google Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.

-}

module Ganeti.HTools.Program
  ( personalities
  ) where

30
import Ganeti.Common (ArgCompletion)
31
32
33
34
import Ganeti.HTools.CLI (OptType, Options)

import qualified Ganeti.HTools.Program.Hail as Hail
import qualified Ganeti.HTools.Program.Hbal as Hbal
35
import qualified Ganeti.HTools.Program.Hcheck as Hcheck
36
37
import qualified Ganeti.HTools.Program.Hscan as Hscan
import qualified Ganeti.HTools.Program.Hspace as Hspace
38
import qualified Ganeti.HTools.Program.Hinfo as Hinfo
39
40

-- | Supported binaries.
41
personalities :: [(String,
42
43
                   (Options -> [String] -> IO (), IO [OptType],
                    [ArgCompletion]))]
44
45
46
47
48
49
personalities = [ ("hail",   (Hail.main,   Hail.options,   Hail.arguments))
                , ("hbal",   (Hbal.main,   Hbal.options,   Hbal.arguments))
                , ("hcheck", (Hcheck.main, Hcheck.options, Hcheck.arguments))
                , ("hscan",  (Hscan.main,  Hscan.options,  Hscan.arguments ))
                , ("hspace", (Hspace.main, Hspace.options, Hspace.arguments))
                , ("hinfo",  (Hinfo.main,  Hinfo.options,  Hinfo.arguments))
50
                ]