|
|
|
|
|
| Description |
Implementation of command-line functions.
This module holds the common command-line related functions for the
binaries, separated into this module since Ganeti.HTools.Utils is
used in many other places and this is more IO oriented.
|
|
| Synopsis |
|
|
|
|
| Constants
|
|
| defaultLuxiSocket :: FilePath | Source |
|
The default value for the luxi socket.
This is re-exported from the Ganeti.Constants module.
|
|
| Data types
|
|
|
| Command line options structure.
| | Constructors | | Options | | | optDataFile :: Maybe FilePath | Path to the cluster data file
| | optDiskMoves :: Bool | Allow disk moves
| | optInstMoves :: Bool | Allow instance moves
| | optDiskTemplate :: Maybe DiskTemplate | Override for the disk template
| | optSpindleUse :: Maybe Int | Override for the spindle usage
| | optDynuFile :: Maybe FilePath | Optional file with dynamic use data
| | optEvacMode :: Bool | Enable evacuation mode
| | optExInst :: [String] | Instances to be excluded
| | optExTags :: Maybe [String] | Tags to use for exclusion
| | optExecJobs :: Bool | Execute the commands via Luxi
| | optGroup :: Maybe GroupID | The UUID of the group to process
| | optIAllocSrc :: Maybe FilePath | The iallocation spec
| | optSelInst :: [String] | Instances to be excluded
| | optLuxi :: Maybe FilePath | Collect data from Luxi
| | optMachineReadable :: Bool | Output machine-readable format
| | optMaster :: String | Collect data from RAPI
| | optMaxLength :: Int | Stop after this many steps
| | optMcpu :: Maybe Double | Override max cpu ratio for nodes
| | optMdsk :: Double | Max disk usage ratio for nodes
| | optMinGain :: Score | Min gain we aim for in a step
| | optMinGainLim :: Score | Limit below which we apply mingain
| | optMinScore :: Score | The minimum score we aim for
| | optNoHeaders :: Bool | Do not show a header line
| | optNoSimulation :: Bool | Skip the rebalancing dry-run
| | optNodeSim :: [String] | Cluster simulation mode
| | optOffline :: [String] | Names of offline nodes
| | optOutPath :: FilePath | Path to the output directory
| | optSaveCluster :: Maybe FilePath | Save cluster state to this file
| | optShowCmds :: Maybe FilePath | Whether to show the command list
| | optShowHelp :: Bool | Just show the help
| | optShowInsts :: Bool | Whether to show the instance map
| | optShowNodes :: Maybe [String] | Whether to show node status
| | optShowVer :: Bool | Just show the program version
| | optStdSpec :: Maybe RSpec | Requested standard specs
| | optTestCount :: Maybe Int | Optional test count override
| | optTieredSpec :: Maybe RSpec | Requested specs for tiered mode
| | optReplay :: Maybe String | Unittests: RNG state
| | optVerbose :: Int | Verbosity level
|
|
|
|
|
|
| Default values for the command line options.
|
|
|
| Abrreviation for the option type.
|
|
| Helper functions
|
|
|
|
| Command line options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Functions
|
|
|
| :: Bool | Default value (when we get a Nothing)
| | -> Maybe String | Parameter value
| | -> Result Bool | Resulting boolean value
| | Helper for parsing a yes/no command line flag.
|
|
|
|
| Usage info.
|
|
| versionInfo :: String -> String | Source |
|
| Show the program version info.
|
|
|
| :: [String] | The command line arguments
| | -> String | The program name
| | -> [OptType] | The supported command line options
| | -> IO (Options, [String]) | The resulting options and leftover
arguments
| | Command line parser, using the Options structure.
|
|
|
|
| Inner parse options. The arguments are similar to parseOpts,
but it returns either a Left composed of exit code and message,
or a Right for the success case.
|
|
|
| A shell script template for autogenerated scripts.
|
|
|
| :: Maybe [String] | The field list
| | -> String | Informational message
| | -> [String] -> String | Function to generate the listing
| | -> IO () | | | Optionally print the node list.
|
|
|
|
| :: Bool | Whether to print the instance list
| | -> String | Type of the instance map (e.g. initial)
| | -> String | The instance data
| | -> IO () | | | Optionally print the instance list.
|
|
|
|
| :: [String] | The warning messages
| | -> IO () | | | Function to display warning messages from parsing the cluster
state.
|
|
|
|
| :: String | Prefix to printed variables
| | -> [(String, String)] | List of (key, value) pairs to be printed
| | -> IO () | | | Format a list of key, value as a shell fragment.
|
|
|
|
| :: String | Prefix to printed variable
| | -> Bool | Whether output should be machine readable
Note: if not, there is nothing to print
| | -> IO () | | | Prints the final OK marker in machine readable output.
|
|
|
|
| Potentially set the node as offline based on passed offline list.
|
|
|
| Set node properties based on command line options.
|
|
| Produced by Haddock version 2.6.0 |