Skip to content
Snippets Groups Projects
Commit d85a0a0f authored by Iustin Pop's avatar Iustin Pop
Browse files

Cleanup an old function

Also replace a type with its synonim.
parent 9188aeef
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ computeBadItems nl il =
(bad_nodes, bad_instances)
-- | Compute the total free disk and memory in the cluster.
totalResources :: Container.Container Node.Node -> (Int, Int)
totalResources :: Node.List -> (Int, Int)
totalResources nl =
foldl'
(\ (mem, dsk) node -> (mem + (Node.f_mem node),
......
......@@ -5,7 +5,6 @@ module Ganeti.HTools.Utils
debug
, sepSplit
, varianceCoeff
, readData
, commaJoin
, readEitherString
, loadJSArray
......@@ -73,15 +72,6 @@ stdDev lst =
varianceCoeff :: Floating a => [a] -> a
varianceCoeff lst = (stdDev lst) / (fromIntegral $ length lst)
-- | Get an Ok result or print the error and exit.
readData :: Result a -> IO a
readData nd =
(case nd of
Bad x -> do
putStrLn x
exitWith $ ExitFailure 1
Ok x -> return x)
-- * JSON-related functions
-- | Converts a JSON Result into a monadic value.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment