More code reorganizations
[ganeti-local] / Ganeti / HTools / Node.hs
index 8dffd58..c5856fb 100644 (file)
@@ -26,6 +26,9 @@ module Ganeti.HTools.Node
     , setSec
     -- * Formatting
     , list
+    -- * Misc stuff
+    , AssocList
+    , noSecondary
     ) where
 
 import Data.List
@@ -35,8 +38,6 @@ import qualified Ganeti.HTools.Container as Container
 import qualified Ganeti.HTools.Instance as Instance
 import qualified Ganeti.HTools.PeerMap as PeerMap
 
-import Ganeti.HTools.Utils
-
 data Node = Node { t_mem :: Double -- ^ total memory (MiB)
                  , n_mem :: Int    -- ^ node memory (MiB)
                  , f_mem :: Int    -- ^ free memory (MiB)
@@ -58,6 +59,13 @@ data Node = Node { t_mem :: Double -- ^ total memory (MiB)
                                    -- score computations
   } deriving (Show)
 
+-- | A simple name for the int, node association list
+type AssocList = [(Int, Node)]
+
+-- | Constant node index for a non-moveable instance
+noSecondary :: Int
+noSecondary = -1
+
 {- | Create a new node.
 
 The index and the peers maps are empty, and will be need to be update