Commit 9899796b authored by René Nussbaumer's avatar René Nussbaumer
Browse files

htools/CLI: Adding new options to use ialloc as source


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 786c514c
...@@ -50,6 +50,7 @@ module Ganeti.HTools.CLI ...@@ -50,6 +50,7 @@ module Ganeti.HTools.CLI
, oExTags , oExTags
, oExecJobs , oExecJobs
, oGroup , oGroup
, oIAllocSrc
, oInstMoves , oInstMoves
, oLuxiSocket , oLuxiSocket
, oMachineReadable , oMachineReadable
...@@ -118,6 +119,7 @@ data Options = Options ...@@ -118,6 +119,7 @@ data Options = Options
, optExTags :: Maybe [String] -- ^ Tags to use for exclusion , optExTags :: Maybe [String] -- ^ Tags to use for exclusion
, optExecJobs :: Bool -- ^ Execute the commands via Luxi , optExecJobs :: Bool -- ^ Execute the commands via Luxi
, optGroup :: Maybe GroupID -- ^ The UUID of the group to process , optGroup :: Maybe GroupID -- ^ The UUID of the group to process
, optIAllocSrc :: Maybe FilePath -- ^ The iallocation spec
, optSelInst :: [String] -- ^ Instances to be excluded , optSelInst :: [String] -- ^ Instances to be excluded
, optLuxi :: Maybe FilePath -- ^ Collect data from Luxi , optLuxi :: Maybe FilePath -- ^ Collect data from Luxi
, optMachineReadable :: Bool -- ^ Output machine-readable format , optMachineReadable :: Bool -- ^ Output machine-readable format
...@@ -158,6 +160,7 @@ defaultOptions = Options ...@@ -158,6 +160,7 @@ defaultOptions = Options
, optExTags = Nothing , optExTags = Nothing
, optExecJobs = False , optExecJobs = False
, optGroup = Nothing , optGroup = Nothing
, optIAllocSrc = Nothing
, optSelInst = [] , optSelInst = []
, optLuxi = Nothing , optLuxi = Nothing
, optMachineReadable = False , optMachineReadable = False
...@@ -269,6 +272,11 @@ oGroup = Option "G" ["group"] ...@@ -269,6 +272,11 @@ oGroup = Option "G" ["group"]
(ReqArg (\ f o -> Ok o { optGroup = Just f }) "ID") (ReqArg (\ f o -> Ok o { optGroup = Just f }) "ID")
"the ID of the group to balance" "the ID of the group to balance"
oIAllocSrc :: OptType
oIAllocSrc = Option "I" ["ialloc-src"]
(ReqArg (\ f opts -> Ok opts { optIAllocSrc = Just f }) "FILE")
"Specify an iallocator spec as the cluster data source"
oLuxiSocket :: OptType oLuxiSocket :: OptType
oLuxiSocket = Option "L" ["luxi"] oLuxiSocket = Option "L" ["luxi"]
(OptArg ((\ f opts -> Ok opts { optLuxi = Just f }) . (OptArg ((\ f opts -> Ok opts { optLuxi = Just f }) .
......
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