From 410a8a763b922bf8a7c0069b8ce2e17b23f4940c Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 22 Dec 2011 11:09:50 +0100
Subject: [PATCH] Rename optISpec to optStdSpec
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

More consistency with the tiered allocation mode.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenΓ© Nussbaumer <rn@google.com>
---
 htools/Ganeti/HTools/CLI.hs            | 6 +++---
 htools/Ganeti/HTools/Program/Hspace.hs | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/htools/Ganeti/HTools/CLI.hs b/htools/Ganeti/HTools/CLI.hs
index 58ffa22f7..442fd4326 100644
--- a/htools/Ganeti/HTools/CLI.hs
+++ b/htools/Ganeti/HTools/CLI.hs
@@ -115,7 +115,6 @@ data Options = Options
   , optExecJobs    :: Bool           -- ^ Execute the commands via Luxi
   , optGroup       :: Maybe GroupID  -- ^ The UUID of the group to process
   , optSelInst     :: [String]       -- ^ Instances to be excluded
-  , optISpec       :: RSpec          -- ^ Requested instance specs
   , optLuxi        :: Maybe FilePath -- ^ Collect data from Luxi
   , optMachineReadable :: Bool       -- ^ Output machine-readable format
   , optMaster      :: String         -- ^ Collect data from RAPI
@@ -135,6 +134,7 @@ data Options = Options
   , optShowInsts   :: Bool           -- ^ Whether to show the instance map
   , optShowNodes   :: Maybe [String] -- ^ Whether to show node status
   , optShowVer     :: Bool           -- ^ Just show the program version
+  , optStdSpec     :: RSpec          -- ^ Requested standard specs
   , optTieredSpec  :: Maybe RSpec    -- ^ Requested specs for tiered mode
   , optReplay      :: Maybe String   -- ^ Unittests: RNG state
   , optVerbose     :: Int            -- ^ Verbosity level
@@ -154,7 +154,6 @@ defaultOptions  = Options
   , optExecJobs    = False
   , optGroup       = Nothing
   , optSelInst     = []
-  , optISpec       = RSpec 1 4096 102400
   , optLuxi        = Nothing
   , optMachineReadable = False
   , optMaster      = ""
@@ -174,6 +173,7 @@ defaultOptions  = Options
   , optShowInsts   = False
   , optShowNodes   = Nothing
   , optShowVer     = False
+  , optStdSpec     = RSpec 1 4096 102400
   , optTieredSpec  = Nothing
   , optReplay      = Nothing
   , optVerbose     = 1
@@ -383,7 +383,7 @@ oStdSpec :: OptType
 oStdSpec = Option "" ["standard-alloc"]
              (ReqArg (\ inp opts -> do
                         tspec <- parseISpecString "standard" inp
-                        return $ opts { optISpec = tspec } )
+                        return $ opts { optStdSpec = tspec } )
               "STDSPEC")
              "enable standard specs allocation, given as 'disk,ram,cpu'"
 
diff --git a/htools/Ganeti/HTools/Program/Hspace.hs b/htools/Ganeti/HTools/Program/Hspace.hs
index 63dddc146..3248a9807 100644
--- a/htools/Ganeti/HTools/Program/Hspace.hs
+++ b/htools/Ganeti/HTools/Program/Hspace.hs
@@ -392,7 +392,7 @@ main = do
          exitWith $ ExitFailure 1
 
   let verbose = optVerbose opts
-      ispec = optISpec opts
+      ispec = optStdSpec opts
       disk_template = optDiskTemplate opts
       req_nodes = Instance.requiredNodes disk_template
       machine_r = optMachineReadable opts
-- 
GitLab