Revision 3bebda52 htools/Ganeti/OpCodes.hs
b/htools/Ganeti/OpCodes.hs | ||
---|---|---|
79 | 79 |
|
80 | 80 |
-- | OpCode representation. |
81 | 81 |
-- |
82 |
-- We only implement a subset of Ganeti opcodes, but only what we
|
|
83 |
-- actually use in the htools codebase.
|
|
82 |
-- We only implement a subset of Ganeti opcodes: those which are actually used
|
|
83 |
-- in the htools codebase. |
|
84 | 84 |
$(genOpCode "OpCode" |
85 | 85 |
[ ("OpTestDelay", |
86 | 86 |
[ simpleField "duration" [t| Double |] |
... | ... | |
106 | 106 |
, defaultField [| False |] $ simpleField "allow_failover" [t| Bool |] |
107 | 107 |
, optionalField $ simpleField "target_node" [t| String |] |
108 | 108 |
]) |
109 |
, ("OpTagsSet", |
|
110 |
[ simpleField "kind" [t| TagObject |] |
|
111 |
, simpleField "tags" [t| [String] |] |
|
112 |
, optionalNullSerField $ simpleField "name" [t| String |] |
|
113 |
]) |
|
114 |
, ("OpTagsDel", |
|
115 |
[ simpleField "kind" [t| TagObject |] |
|
116 |
, simpleField "tags" [t| [String] |] |
|
117 |
, optionalNullSerField $ simpleField "name" [t| String |] |
|
118 |
]) |
|
109 | 119 |
]) |
110 | 120 |
|
111 | 121 |
-- | Returns the OP_ID for a given opcode value. |
Also available in: Unified diff