Commit 31463db5 authored by Iustin Pop's avatar Iustin Pop
Browse files

IAlloc: read group uuid from the input message



This makes the code incompatible with JSON files from Ganeti pre-2.4.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
parent b3707354
......@@ -80,8 +80,9 @@ parseNode :: String -- ^ The node's name
parseNode n a = do
offline <- fromObj "offline" a
drained <- fromObj "drained" a
guuid <- fromObj "group" a
node <- (if offline || drained
then return $ Node.create n 0 0 0 0 0 0 True defaultUUID
then return $ Node.create n 0 0 0 0 0 0 True guuid
else do
mtotal <- fromObj "total_memory" a
mnode <- fromObj "reserved_memory" a
......@@ -90,7 +91,7 @@ parseNode n a = do
dfree <- fromObj "free_disk" a
ctotal <- fromObj "total_cpus" a
return $ Node.create n mtotal mnode mfree
dtotal dfree ctotal False defaultUUID)
dtotal dfree ctotal False guuid)
return (n, node)
-- | Top-level parser.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment