Revision 06fd57e5

b/lib/constants.py
2468 2468
NDS_START_NODE_DAEMON = "start_node_daemon"
2469 2469

  
2470 2470
# Path generating random UUID
2471
RANDOM_UUID_FILE = "/proc/sys/kernel/random/uuid"
2471
RANDOM_UUID_FILE = _constants.RANDOM_UUID_FILE
2472 2472

  
2473 2473
# Regex string for verifying a UUID
2474 2474
UUID_REGEX = "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
b/src/Ganeti/ConstantUtils.hs
80 80
devConsole :: String
81 81
devConsole = "/dev/console"
82 82

  
83
-- | Random uuid generator
84
--
85
-- This is defined here and not in 'Ganeti.HsConstants' order to avoid
86
-- a circular dependendy between 'Ganeti.HsConstants' and
87
-- 'Ganeti.Types'
88
randomUuidFile :: String
89
randomUuidFile = "/proc/sys/kernel/random/uuid"
90

  
83 91
-- | Priority levels
84 92
--
85 93
-- This is defined here and not in 'Ganeti.Types' order to avoid a GHC
b/src/Ganeti/HsConstants.hs
268 268
blockdevDriverManual :: String
269 269
blockdevDriverManual = "manual"
270 270

  
271
-- | Path generating random UUID
272
randomUuidFile :: String
273
randomUuidFile = ConstantUtils.randomUuidFile
274

  
271 275
-- * Auto-repair tag prefixes
272 276

  
273 277
autoRepairTagPrefix :: String
b/src/Ganeti/Utils.hs
71 71
import Network.Socket
72 72

  
73 73
import Ganeti.BasicTypes
74
import qualified Ganeti.Constants as C
74
import qualified Ganeti.ConstantUtils as ConstantUtils
75 75
import Ganeti.Logging
76 76
import Ganeti.Runtime
77 77
import System.IO
......
317 317
-- This is a Linux-specific method as it uses the /proc filesystem.
318 318
newUUID :: IO String
319 319
newUUID = do
320
  contents <- readFile C.randomUuidFile
320
  contents <- readFile ConstantUtils.randomUuidFile
321 321
  return $! rStripSpace $ take 128 contents
322 322

  
323 323
-- | Returns the current time as an 'Integer' representing the number

Also available in: Unified diff