ganeti-htoolsSource codeContentsIndex
Ganeti.HTools.CLI
Description

Implementation of command-line functions.

This module holds the common cli-related functions for the binaries, separated into this module since Utils.hs is used in many other places and this is more IO oriented.

Synopsis
defaultLuxiSocket :: FilePath
data Options = Options {
optShowNodes :: (Maybe [String])
optShowInsts :: Bool
optShowCmds :: (Maybe FilePath)
optOneline :: Bool
optOutPath :: FilePath
optNoHeaders :: Bool
optNodeFile :: FilePath
optNodeSet :: Bool
optInstFile :: FilePath
optInstSet :: Bool
optNodeSim :: (Maybe String)
optMaxLength :: Int
optMaster :: String
optLuxi :: (Maybe FilePath)
optExecJobs :: Bool
optOffline :: [String]
optINodes :: Int
optISpec :: RSpec
optTieredSpec :: (Maybe RSpec)
optMinScore :: Score
optMcpu :: Double
optMdsk :: Double
optDiskMoves :: Bool
optDynuFile :: (Maybe FilePath)
optExTags :: (Maybe [String])
optVerbose :: Int
optShowVer :: Bool
optShowHelp :: Bool
}
defaultOptions :: Options
type OptType = OptDescr (Options -> Result Options)
oPrintNodes :: OptType
oPrintInsts :: OptType
oPrintCommands :: OptType
oOneline :: OptType
oNoHeaders :: OptType
oOutputDir :: OptType
oNodeFile :: OptType
oInstFile :: OptType
oNodeSim :: OptType
oRapiMaster :: OptType
oLuxiSocket :: OptType
oExecJobs :: OptType
oVerbose :: OptType
oQuiet :: OptType
oOfflineNode :: OptType
oMaxSolLength :: OptType
oMinScore :: OptType
oIMem :: OptType
oIDisk :: OptType
oIVcpus :: OptType
oINodes :: OptType
oMaxCpu :: OptType
oMinDisk :: OptType
oDiskMoves :: OptType
oDynuFile :: OptType
oExTags :: OptType
oTieredSpec :: OptType
oShowVer :: OptType
oShowHelp :: OptType
usageHelp :: String -> [OptType] -> String
parseOpts :: [String] -> String -> [OptType] -> IO (Options, [String])
shTemplate :: String
Documentation
defaultLuxiSocket :: FilePathSource
The default value for the luxi socket
data Options Source
Command line options structure.
Constructors
Options
optShowNodes :: (Maybe [String])Whether to show node status
optShowInsts :: BoolWhether to show the instance map
optShowCmds :: (Maybe FilePath)Whether to show the command list
optOneline :: BoolSwitch output to a single line
optOutPath :: FilePathPath to the output directory
optNoHeaders :: BoolDo not show a header line
optNodeFile :: FilePathPath to the nodes file
optNodeSet :: BoolThe nodes have been set by options
optInstFile :: FilePathPath to the instances file
optInstSet :: BoolThe insts have been set by options
optNodeSim :: (Maybe String)Cluster simulation mode
optMaxLength :: IntStop after this many steps
optMaster :: StringCollect data from RAPI
optLuxi :: (Maybe FilePath)Collect data from Luxi
optExecJobs :: BoolExecute the commands via Luxi
optOffline :: [String]Names of offline nodes
optINodes :: IntNodes required for an instance
optISpec :: RSpecRequested instance specs
optTieredSpec :: (Maybe RSpec)Requested specs for tiered mode
optMinScore :: ScoreThe minimum score we aim for
optMcpu :: DoubleMax cpu ratio for nodes
optMdsk :: DoubleMax disk usage ratio for nodes
optDiskMoves :: BoolAllow disk moves
optDynuFile :: (Maybe FilePath)Optional file with dynamic use data
optExTags :: (Maybe [String])Tags to use for exclusion
optVerbose :: IntVerbosity level
optShowVer :: BoolJust show the program version
optShowHelp :: BoolJust show the help
show/hide Instances
Show Options
defaultOptions :: OptionsSource
Default values for the command line options.
type OptType = OptDescr (Options -> Result Options)Source
Abrreviation for the option type
oPrintNodes :: OptTypeSource
oPrintInsts :: OptTypeSource
oPrintCommands :: OptTypeSource
oOneline :: OptTypeSource
oNoHeaders :: OptTypeSource
oOutputDir :: OptTypeSource
oNodeFile :: OptTypeSource
oInstFile :: OptTypeSource
oNodeSim :: OptTypeSource
oRapiMaster :: OptTypeSource
oLuxiSocket :: OptTypeSource
oExecJobs :: OptTypeSource
oVerbose :: OptTypeSource
oQuiet :: OptTypeSource
oOfflineNode :: OptTypeSource
oMaxSolLength :: OptTypeSource
oMinScore :: OptTypeSource
oIMem :: OptTypeSource
oIDisk :: OptTypeSource
oIVcpus :: OptTypeSource
oINodes :: OptTypeSource
oMaxCpu :: OptTypeSource
oMinDisk :: OptTypeSource
oDiskMoves :: OptTypeSource
oDynuFile :: OptTypeSource
oExTags :: OptTypeSource
oTieredSpec :: OptTypeSource
oShowVer :: OptTypeSource
oShowHelp :: OptTypeSource
usageHelp :: String -> [OptType] -> StringSource
Usage info
parseOptsSource
:: [String]The command line arguments
-> StringThe program name
-> [OptType]The supported command line options
-> IO (Options, [String])The resulting options and leftover arguments
Command line parser, using the options structure.
shTemplate :: StringSource
A shell script template for autogenerated scripts.
Produced by Haddock version 0.8