[PATCH master 3/5] htools/CLI: Adding new options to use ialloc as source

1 view
Skip to first unread message

René Nussbaumer

unread,
Mar 2, 2012, 7:33:59 AM3/2/12
to ganeti...@googlegroups.com
---
htools/Ganeti/HTools/CLI.hs | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/htools/Ganeti/HTools/CLI.hs b/htools/Ganeti/HTools/CLI.hs
index 6f2c135..405b51b 100644
--- a/htools/Ganeti/HTools/CLI.hs
+++ b/htools/Ganeti/HTools/CLI.hs
@@ -50,6 +50,7 @@ module Ganeti.HTools.CLI
, oExTags
, oExecJobs
, oGroup
+ , oIAllocSrc
, oInstMoves
, oLuxiSocket
, oMachineReadable
@@ -118,6 +119,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
+ , 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
@@ -158,6 +160,7 @@ defaultOptions = Options
, optExTags = Nothing
, optExecJobs = False
, optGroup = Nothing
+ , optIAllocSrc = Nothing
, optSelInst = []
, optLuxi = Nothing
, optMachineReadable = False
@@ -269,6 +272,11 @@ oGroup = Option "G" ["group"]
(ReqArg (\ f o -> Ok o { optGroup = Just f }) "ID")
"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 = Option "L" ["luxi"]
(OptArg ((\ f opts -> Ok opts { optLuxi = Just f }) .
--
1.7.7.3

Iustin Pop

unread,
Mar 2, 2012, 10:53:42 AM3/2/12
to René Nussbaumer, ganeti...@googlegroups.com
On Fri, Mar 02, 2012 at 01:33:59PM +0100, Ren� Nussbaumer wrote:
> ---
> htools/Ganeti/HTools/CLI.hs | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)

LGTM.

Reply all
Reply to author
Forward
0 new messages