X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/428346450df82d084ac85bd88604ed5c6f4ca509..dd77da99042407249f3133b2d18222fa018820c9:/htools/Ganeti/HTools/Program/Hspace.hs diff --git a/htools/Ganeti/HTools/Program/Hspace.hs b/htools/Ganeti/HTools/Program/Hspace.hs index 960d4fd..6dd4905 100644 --- a/htools/Ganeti/HTools/Program/Hspace.hs +++ b/htools/Ganeti/HTools/Program/Hspace.hs @@ -23,7 +23,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -} -module Ganeti.HTools.Program.Hspace (main, options) where +module Ganeti.HTools.Program.Hspace + (main + , options + , arguments + ) where import Control.Monad import Data.Char (toUpper, toLower) @@ -40,11 +44,13 @@ import qualified Ganeti.HTools.Cluster as Cluster import qualified Ganeti.HTools.Node as Node import qualified Ganeti.HTools.Instance as Instance -import Ganeti.HTools.Utils +import Ganeti.BasicTypes +import Ganeti.Common import Ganeti.HTools.Types import Ganeti.HTools.CLI import Ganeti.HTools.ExtLoader import Ganeti.HTools.Loader +import Ganeti.Utils -- | Options list and functions. options :: [OptType] @@ -69,6 +75,10 @@ options = , oSaveCluster ] +-- | The list of arguments supported by the program. +arguments :: [ArgCompletion] +arguments = [] + -- | The allocation phase we're in (initial, after tiered allocs, or -- after regular allocation). data Phase = PInitial @@ -112,7 +122,7 @@ cpuEff :: Cluster.CStats -> Double cpuEff = effFn Cluster.csIcpu (fromIntegral . Cluster.csVcpu) -- | Holds data for converting a 'Cluster.CStats' structure into --- detailed statictics. +-- detailed statistics. statsData :: [(String, Cluster.CStats -> String)] statsData = [ ("SCORE", printf "%.8f" . Cluster.csScore) , ("INST_CNT", printf "%d" . Cluster.csNinst) @@ -377,7 +387,7 @@ instFromSpec spx = -- | Main function. main :: Options -> [String] -> IO () main opts args = do - exitUnless (null args) "this program doesn't take any arguments" + exitUnless (null args) "This program doesn't take any arguments." let verbose = optVerbose opts machine_r = optMachineReadable opts