Read auto_balance via Rapi
authorIustin Pop <iustin@google.com>
Thu, 7 Apr 2011 15:00:49 +0000 (17:00 +0200)
committerIustin Pop <iustin@google.com>
Thu, 14 Apr 2011 08:34:17 +0000 (10:34 +0200)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>

htools/Ganeti/HTools/Rapi.hs

index c2d79ce..936fc44 100644 (file)
@@ -122,7 +122,9 @@ parseInstance ktn a = do
             else readEitherString (head snodes) >>= lookupNode ktn name)
   running <- extract "status" a
   tags <- extract "tags" a
-  let inst = Instance.create name mem disk vcpus running tags True pnode snode
+  auto_balance <- extract "auto_balance" beparams
+  let inst = Instance.create name mem disk vcpus running tags
+             auto_balance pnode snode
   return (name, inst)
 
 -- | Construct a node from a JSON object.