Commit 5a4a3b7f authored by Iustin Pop's avatar Iustin Pop
Browse files

htools: read the disk template in Luxi and Rapi



Both these backends already have the data, we just need to use it.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent d25643d1
...@@ -66,8 +66,9 @@ parseBaseInstance n a = do ...@@ -66,8 +66,9 @@ parseBaseInstance n a = do
mem <- extract "memory" mem <- extract "memory"
vcpus <- extract "vcpus" vcpus <- extract "vcpus"
tags <- extract "tags" tags <- extract "tags"
dt <- extract "disk_template"
let running = "running" let running = "running"
return (n, Instance.create n mem disk vcpus running tags True 0 0 DTDrbd8) return (n, Instance.create n mem disk vcpus running tags True 0 0 dt)
-- | Parses an instance as found in the cluster instance list. -- | Parses an instance as found in the cluster instance list.
parseInstance :: NameAssoc -- ^ The node name-to-index association list parseInstance :: NameAssoc -- ^ The node name-to-index association list
......
...@@ -119,8 +119,9 @@ parseInstance ktn a = do ...@@ -119,8 +119,9 @@ parseInstance ktn a = do
running <- extract "status" a running <- extract "status" a
tags <- extract "tags" a tags <- extract "tags" a
auto_balance <- extract "auto_balance" beparams auto_balance <- extract "auto_balance" beparams
dt <- extract "disk_template" a
let inst = Instance.create name mem disk vcpus running tags let inst = Instance.create name mem disk vcpus running tags
auto_balance pnode snode DTDrbd8 auto_balance pnode snode dt
return (name, inst) return (name, inst)
-- | Construct a node from a JSON object. -- | Construct a node from a JSON object.
......
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