projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpCodes.hs: make allow_failover optional
[ganeti-local]
/
htools
/
Ganeti
/
OpCodes.hs
diff --git
a/htools/Ganeti/OpCodes.hs
b/htools/Ganeti/OpCodes.hs
index
4b750af
..
f16c230
100644
(file)
--- a/
htools/Ganeti/OpCodes.hs
+++ b/
htools/Ganeti/OpCodes.hs
@@
-95,7
+95,7
@@
loadOpCode v = do
inst <- extract "instance_name"
live <- extract "live"
cleanup <- extract "cleanup"
inst <- extract "instance_name"
live <- extract "live"
cleanup <- extract "cleanup"
- allow_failover <- extract "allow_failover"
+ allow_failover <- fromObjWithDefault o "allow_failover" False
return $ OpMigrateInstance inst live cleanup allow_failover
_ -> J.Error $ "Unknown opcode " ++ op_id
return $ OpMigrateInstance inst live cleanup allow_failover
_ -> J.Error $ "Unknown opcode " ++ op_id