Revision c4d98278

b/Ganeti/HTools/Node.hs
119 119
    , utilPool :: T.DynUtil -- ^ Total utilisation capacity
120 120
    , utilLoad :: T.DynUtil -- ^ Sum of instance utilisation
121 121
    , pTags    :: TagMap    -- ^ Map of primary instance tags and their count
122
    , group    :: String    -- ^ The node's group (as UUID)
122
    , group    :: T.GroupID -- ^ The node's group (as UUID)
123 123
    } deriving (Show, Eq)
124 124

  
125 125
instance T.Element Node where
b/Ganeti/HTools/QC.hs
176 176
      offl <- arbitrary
177 177
      let n = Node.create name (fromIntegral mem_t) mem_n mem_f
178 178
              (fromIntegral dsk_t) dsk_f (fromIntegral cpu_t) offl
179
              Utils.defaultUUID
179
              Utils.defaultGroupID
180 180
          n' = Node.buildPeers n Container.empty
181 181
      return n'
182 182

  
b/Ganeti/HTools/Simu.hs
59 59
                    let n = Node.create (printf "node%03d" idx)
60 60
                            (fromIntegral mem) 0 mem
61 61
                            (fromIntegral disk) disk
62
                            (fromIntegral cpu) False defaultUUID
62
                            (fromIntegral cpu) False defaultGroupID
63 63
                    in (idx, Node.setIdx n idx)
64 64
                  ) [1..cnt]
65 65
  return (nodes, [], [])
b/Ganeti/HTools/Text.hs
95 95
loadNode :: (Monad m) => [String] -> m (String, Node.Node)
96 96
-- compatibility wrapper for old text files
97 97
loadNode [name, tm, nm, fm, td, fd, tc, fo] =
98
  loadNode [name, tm, nm, fm, td, fd, tc, fo, defaultUUID]
98
  loadNode [name, tm, nm, fm, td, fd, tc, fo, defaultGroupID]
99 99
loadNode [name, tm, nm, fm, td, fd, tc, fo, gu] = do
100 100
  new_node <-
101 101
      if any (== "?") [tm,nm,fm,td,fd,tc] || fo == "Y" then
b/Ganeti/HTools/Types.hs
29 29
    , NameAssoc
30 30
    , Score
31 31
    , Weight
32
    , GroupID
32 33
    , RSpec(..)
33 34
    , DynUtil(..)
34 35
    , zeroUtil
......
69 70
-- | A separate name for a weight metric.
70 71
type Weight = Double
71 72

  
73
-- | The Group UUID type
74
type GroupID = String
75

  
72 76
-- | The resource spec type.
73 77
data RSpec = RSpec
74 78
    { rspecCpu  :: Int  -- ^ Requested VCPUs
b/Ganeti/HTools/Utils.hs
41 41
    , tryRead
42 42
    , formatTable
43 43
    , annotateResult
44
    , defaultUUID
44
    , defaultGroupID
45 45
    ) where
46 46

  
47 47
import Control.Monad (liftM)
......
211 211
                    ) (zip3 vtrans numpos mlens)
212 212
   in transpose expnd
213 213

  
214
-- | Default UUID (just a string, not a real UUID)
215
defaultUUID :: String
216
defaultUUID = "00000000-0000-0000-0000-000000000000"
214
-- | Default group UUID (just a string, not a real UUID)
215
defaultGroupID :: GroupID
216
defaultGroupID = "00000000-0000-0000-0000-000000000000"

Also available in: Unified diff