Revision be747966 htools/Ganeti/Luxi.hs
b/htools/Ganeti/Luxi.hs | ||
---|---|---|
32 | 32 |
, Client |
33 | 33 |
, JobId |
34 | 34 |
, RecvResult(..) |
35 |
, TagObject(..) |
|
35 | 36 |
, strOfOp |
36 | 37 |
, checkRS |
37 | 38 |
, getClient |
... | ... | |
99 | 100 |
-- | The Ganeti job type. |
100 | 101 |
type JobId = Int |
101 | 102 |
|
103 |
-- | Data type representing what items do the tag operations apply to. |
|
104 |
$(declareSADT "TagObject" |
|
105 |
[ ("TagInstance", 'tagInstance) |
|
106 |
, ("TagNode", 'tagNode) |
|
107 |
, ("TagGroup", 'tagNodegroup) |
|
108 |
, ("TagCluster", 'tagCluster) |
|
109 |
]) |
|
110 |
$(makeJSONInstance ''TagObject) |
|
111 |
|
|
102 | 112 |
-- | Currently supported Luxi operations and JSON serialization. |
103 | 113 |
$(genLuxiOp "LuxiOp" |
104 | 114 |
[(luxiReqQuery, |
... | ... | |
134 | 144 |
) |
135 | 145 |
, (luxiReqQueryClusterInfo, []) |
136 | 146 |
, (luxiReqQueryTags, |
137 |
[ ("kind", [t| String |])
|
|
147 |
[ ("kind", [t| TagObject |])
|
|
138 | 148 |
, ("name", [t| String |]) |
139 | 149 |
]) |
140 | 150 |
, (luxiReqSubmitJob, |
Also available in: Unified diff