Revision a1505857 htools/Ganeti/OpCodes.hs
b/htools/Ganeti/OpCodes.hs | ||
---|---|---|
54 | 54 |
-- actually use in the htools codebase. |
55 | 55 |
$(genOpCode "OpCode" |
56 | 56 |
[ ("OpTestDelay", |
57 |
[ ("duration", [t| Double |], noDefault)
|
|
58 |
, ("on_master", [t| Bool |], noDefault)
|
|
59 |
, ("on_nodes", [t| [String] |], noDefault)
|
|
57 |
[ simpleField "duration" [t| Double |]
|
|
58 |
, simpleField "on_master" [t| Bool |]
|
|
59 |
, simpleField "on_nodes" [t| [String] |]
|
|
60 | 60 |
]) |
61 | 61 |
, ("OpInstanceReplaceDisks", |
62 |
[ ("instance_name", [t| String |], noDefault)
|
|
63 |
, ("remote_node", [t| Maybe String |], noDefault)
|
|
64 |
, ("mode", [t| ReplaceDisksMode |], noDefault)
|
|
65 |
, ("disks", [t| [Int] |], noDefault)
|
|
66 |
, ("iallocator", [t| Maybe String |], noDefault)
|
|
62 |
[ simpleField "instance_name" [t| String |]
|
|
63 |
, optionalField $ simpleField "remote_node" [t| String |]
|
|
64 |
, simpleField "mode" [t| ReplaceDisksMode |]
|
|
65 |
, simpleField "disks" [t| [Int] |]
|
|
66 |
, optionalField $ simpleField "iallocator" [t| String |]
|
|
67 | 67 |
]) |
68 | 68 |
, ("OpInstanceFailover", |
69 |
[ ("instance_name", [t| String |], noDefault)
|
|
70 |
, ("ignore_consistency", [t| Bool |], noDefault)
|
|
71 |
, ("target_node", [t| Maybe String |], noDefault)
|
|
69 |
[ simpleField "instance_name" [t| String |]
|
|
70 |
, simpleField "ignore_consistency" [t| Bool |]
|
|
71 |
, optionalField $ simpleField "target_node" [t| String |]
|
|
72 | 72 |
]) |
73 | 73 |
, ("OpInstanceMigrate", |
74 |
[ ("instance_name", [t| String |], noDefault)
|
|
75 |
, ("live", [t| Bool |], noDefault)
|
|
76 |
, ("cleanup", [t| Bool |], noDefault)
|
|
77 |
, ("allow_failover", [t| Bool |], [| Just False |])
|
|
78 |
, ("target_node", [t| Maybe String |], noDefault)
|
|
74 |
[ simpleField "instance_name" [t| String |]
|
|
75 |
, simpleField "live" [t| Bool |]
|
|
76 |
, simpleField "cleanup" [t| Bool |]
|
|
77 |
, defaultField [| False |] $ simpleField "allow_failover" [t| Bool |]
|
|
78 |
, optionalField $ simpleField "target_node" [t| String |]
|
|
79 | 79 |
]) |
80 | 80 |
]) |
81 | 81 |
|
Also available in: Unified diff