From a423b510ebc5b68ab02fa0b914030e36cffca87b Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 29 Nov 2010 18:37:33 +0000 Subject: [PATCH] Add new command-line option for group selection Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Balazs Lecz <leczb@google.com> --- Ganeti/HTools/CLI.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Ganeti/HTools/CLI.hs b/Ganeti/HTools/CLI.hs index 336980c50..2ba22c9ad 100644 --- a/Ganeti/HTools/CLI.hs +++ b/Ganeti/HTools/CLI.hs @@ -41,6 +41,7 @@ module Ganeti.HTools.CLI , oExInst , oExTags , oExecJobs + , oGroup , oIDisk , oIMem , oINodes @@ -95,6 +96,7 @@ data Options = Options , 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 , optINodes :: Int -- ^ Nodes required for an instance , optISpec :: RSpec -- ^ Requested instance specs , optLuxi :: Maybe FilePath -- ^ Collect data from Luxi @@ -130,6 +132,7 @@ defaultOptions = Options , optExInst = [] , optExTags = Nothing , optExecJobs = False + , optGroup = Nothing , optINodes = 2 , optISpec = RSpec 1 4096 102400 , optLuxi = Nothing @@ -196,6 +199,11 @@ oExecJobs = Option "X" ["exec"] "execute the suggested moves via Luxi (only available when using\ \ it for data gathering)" +oGroup :: OptType +oGroup = Option "G" ["group"] + (ReqArg (\ f o -> Ok o { optGroup = Just f }) "ID") + "the ID of the group to balance" + oIDisk :: OptType oIDisk = Option "" ["disk"] (ReqArg (\ d opts -> -- GitLab