From 4f83a56097be6e062a1dd99fde6848979f18c6f3 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 16 Oct 2009 13:54:35 +0200
Subject: [PATCH] Add an option to input utilisation data

---
 Ganeti/HTools/CLI.hs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Ganeti/HTools/CLI.hs b/Ganeti/HTools/CLI.hs
index 9462f7823..df68b9960 100644
--- a/Ganeti/HTools/CLI.hs
+++ b/Ganeti/HTools/CLI.hs
@@ -57,6 +57,7 @@ module Ganeti.HTools.CLI
     , oMaxCpu
     , oMinDisk
     , oDiskMoves
+    , oDynuFile
     , oShowVer
     , oShowHelp
     ) where
@@ -103,6 +104,7 @@ data Options = Options
     , optMcpu      :: Double         -- ^ Max cpu ratio for nodes
     , optMdsk      :: Double         -- ^ Max disk usage ratio for nodes
     , optDiskMoves :: Bool           -- ^ Allow disk moves
+    , optDynuFile  :: Maybe FilePath -- ^ Optional file with dynamic use data
     , optVerbose   :: Int            -- ^ Verbosity level
     , optShowVer   :: Bool           -- ^ Just show the program version
     , optShowHelp  :: Bool           -- ^ Just show the help
@@ -135,6 +137,7 @@ defaultOptions  = Options
  , optMcpu      = -1
  , optMdsk      = -1
  , optDiskMoves = True
+ , optDynuFile  = Nothing
  , optVerbose   = 1
  , optShowVer   = False
  , optShowHelp  = False
@@ -271,6 +274,11 @@ oDiskMoves = Option "" ["no-disk-moves"]
              "disallow disk moves from the list of allowed instance changes,\
              \ thus allowing only the 'cheap' failover/migrate operations"
 
+oDynuFile :: OptType
+oDynuFile = Option "U" ["dynu-file"]
+            (ReqArg (\ f opts -> opts { optDynuFile = Just f }) "FILE")
+            "Import dynamic utilisation data from the given FILE"
+
 oShowVer :: OptType
 oShowVer = Option "V" ["version"]
            (NoArg (\ opts -> opts { optShowVer = True}))
-- 
GitLab