Skip to content
Snippets Groups Projects
Commit 0df5a1b4 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a command line option for executing jobs


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 9a2ff880
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ module Ganeti.HTools.CLI
, oNodeSim
, oRapiMaster
, oLuxiSocket
, oExecJobs
, oMaxSolLength
, oVerbose
, oQuiet
......@@ -90,6 +91,7 @@ data Options = Options
, optMaxLength :: Int -- ^ Stop after this many steps
, optMaster :: String -- ^ Collect data from RAPI
, optLuxi :: Maybe FilePath -- ^ Collect data from Luxi
, optExecJobs :: Bool -- ^ Execute the commands via Luxi
, optOffline :: [String] -- ^ Names of offline nodes
, optIMem :: Int -- ^ Instance memory
, optIDsk :: Int -- ^ Instance disk
......@@ -120,6 +122,7 @@ defaultOptions = Options
, optMaxLength = -1
, optMaster = ""
, optLuxi = Nothing
, optExecJobs = False
, optOffline = []
, optIMem = 4096
, optIDsk = 102400
......@@ -192,6 +195,12 @@ oLuxiSocket = Option "L" ["luxi"]
fromMaybe defaultLuxiSocket) "SOCKET")
"collect data via Luxi, optionally using the given SOCKET path"
oExecJobs :: OptType
oExecJobs = Option "X" ["exec"]
(NoArg (\ opts -> opts { optExecJobs = True}))
"execute the suggested moves via Luxi (only available when using\
\ it for data gathering"
oVerbose :: OptType
oVerbose = Option "v" ["verbose"]
(NoArg (\ opts -> opts { optVerbose = optVerbose opts + 1 }))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment