Revision 67ebc173
b/src/Ganeti/DataCollectors/CLI.hs | ||
---|---|---|
39 | 39 |
, oNode |
40 | 40 |
, oConfdAddr |
41 | 41 |
, oConfdPort |
42 |
, oInputFile |
|
42 | 43 |
, genericOptions |
43 | 44 |
) where |
44 | 45 |
|
... | ... | |
64 | 65 |
, optConfdAddr :: Maybe String -- ^ IP address of the Confd server |
65 | 66 |
, optConfdPort :: Maybe Int -- ^ The port of the Confd server to |
66 | 67 |
-- connect to |
68 |
, optInputFile :: Maybe FilePath -- ^ Path to the file containing the |
|
69 |
-- information to be parsed |
|
67 | 70 |
} deriving Show |
68 | 71 |
|
69 | 72 |
-- | Default values for the command line options. |
... | ... | |
77 | 80 |
, optNode = Nothing |
78 | 81 |
, optConfdAddr = Nothing |
79 | 82 |
, optConfdPort = Nothing |
83 |
, optInputFile = Nothing |
|
80 | 84 |
} |
81 | 85 |
|
82 | 86 |
-- | Abbreviation for the option type. |
... | ... | |
127 | 131 |
"Network port of the Confd server to connect to", |
128 | 132 |
OptComplInteger) |
129 | 133 |
|
134 |
oInputFile :: OptType |
|
135 |
oInputFile = |
|
136 |
( Option "f" ["file"] |
|
137 |
(ReqArg (\ f o -> Ok o { optInputFile = Just f }) "FILE") |
|
138 |
"the input FILE", |
|
139 |
OptComplFile) |
|
140 |
|
|
130 | 141 |
-- | Generic options. |
131 | 142 |
genericOptions :: [GenericOptType Options] |
132 | 143 |
genericOptions = [ oShowVer |
Also available in: Unified diff