Commit ddef0585 authored by Guido Trotter's avatar Guido Trotter
Browse files

Add --select-instances hbal flag


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 6c30ce16
......@@ -38,6 +38,7 @@ module Ganeti.HTools.CLI
-- * The options
, oDataFile
, oDiskMoves
, oSelInst
, oInstMoves
, oDynuFile
, oEvacMode
......@@ -102,6 +103,7 @@ data Options = Options
, 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
, optSelInst :: [String] -- ^ Instances to be excluded
, optINodes :: Int -- ^ Nodes required for an instance
, optISpec :: RSpec -- ^ Requested instance specs
, optLuxi :: Maybe FilePath -- ^ Collect data from Luxi
......@@ -139,6 +141,7 @@ defaultOptions = Options
, optExTags = Nothing
, optExecJobs = False
, optGroup = Nothing
, optSelInst = []
, optINodes = 2
, optISpec = RSpec 1 4096 102400
, optLuxi = Nothing
......@@ -178,6 +181,11 @@ oDiskMoves = Option "" ["no-disk-moves"]
"disallow disk moves from the list of allowed instance changes,\
\ thus allowing only the 'cheap' failover/migrate operations"
oSelInst :: OptType
oSelInst = Option "" ["select-instances"]
(ReqArg (\ f opts -> Ok opts { optSelInst = sepSplit ',' f }) "INSTS")
"only select given instances for any moves"
oInstMoves :: OptType
oInstMoves = Option "" ["no-instance-moves"]
(NoArg (\ opts -> Ok opts { optInstMoves = False}))
......
......@@ -77,6 +77,7 @@ options =
, oMinGain
, oMinGainLim
, oDiskMoves
, oSelInst
, oInstMoves
, oDynuFile
, oExTags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment