LGTM
On 10/26/2015 03:01 PM, 'Klaus Aehlig' via ganeti-devel wrote:
This option will tell htools to use state-of-record data instead of
live ("state of world") data. A difference between the two occurs,
e.g., if an instance is resized but not rebooted.
Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/CLI.hs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs
index d24392d..9db1752 100644
--- a/src/Ganeti/HTools/CLI.hs
+++ b/src/Ganeti/HTools/CLI.hs
@@ -115,6 +115,7 @@ module Ganeti.HTools.CLI
, oShowVer
, oShowComp
, oSkipNonRedundant
+ , oSoR
, oStdSpec
, oTargetResources
, oTieredSpec
@@ -159,6 +160,7 @@ data Options = Options
, optIgnoreSoftErrors :: Bool -- ^ Ignore soft errors in balancing
moves
, optIndependentGroups :: Bool -- ^ consider groups independently
, optAcceptExisting :: Bool -- ^ accept existing N+1 violations
+ , optSoR :: Bool -- ^ only use state-of-record data
, optMonD :: Bool -- ^ Query MonDs
, optMonDFile :: Maybe FilePath -- ^ Optional file with data provided
-- by MonDs
@@ -239,6 +241,7 @@ defaultOptions = Options
, optIdleDefault = False
, optIgnoreSoftErrors = False
, optDynuFile = Nothing
+ , optSoR = False
, optMonD = False
, optMonDFile = Nothing
, optMonDXen = False
@@ -402,6 +405,13 @@ oMemWeight =
"Rescale the weight of the memory utilization by the given factor",
OptComplFloat)
+oSoR :: OptType
+oSoR =
+ (Option "" ["state-of-record"]
+ (NoArg (\ opts -> Ok opts { optSoR = True }))
+ "only use state-of-record data",
+ OptComplNone)
+
oMonDExitMissing :: OptType
oMonDExitMissing =
(Option "" ["exit-on-missing-mond-data"]