Revision b20cbf06 htools/Ganeti/Luxi.hs
b/htools/Ganeti/Luxi.hs | ||
---|---|---|
76 | 76 |
-- | Currently supported Luxi operations and JSON serialization. |
77 | 77 |
$(genLuxiOp "LuxiOp" |
78 | 78 |
[("Query" , |
79 |
[ ("what", [t| QrViaLuxi |], [| id |])
|
|
80 |
, ("fields", [t| [String] |], [| id |])
|
|
81 |
, ("qfilter", [t| Maybe (String, [[String]]) |], [| id |])
|
|
82 |
], SDict)
|
|
79 |
[ ("what", [t| QrViaLuxi |], [| id |]) |
|
80 |
, ("fields", [t| [String] |], [| id |]) |
|
81 |
, ("qfilter", [t| () |], [| const JSNull |])
|
|
82 |
]) |
|
83 | 83 |
, ("QueryNodes", |
84 | 84 |
[ ("names", [t| [String] |], [| id |]) |
85 | 85 |
, ("fields", [t| [String] |], [| id |]) |
86 | 86 |
, ("lock", [t| Bool |], [| id |]) |
87 |
], SList)
|
|
87 |
]) |
|
88 | 88 |
, ("QueryGroups", |
89 | 89 |
[ ("names", [t| [String] |], [| id |]) |
90 | 90 |
, ("fields", [t| [String] |], [| id |]) |
91 | 91 |
, ("lock", [t| Bool |], [| id |]) |
92 |
], SList)
|
|
92 |
]) |
|
93 | 93 |
, ("QueryInstances", |
94 | 94 |
[ ("names", [t| [String] |], [| id |]) |
95 | 95 |
, ("fields", [t| [String] |], [| id |]) |
96 | 96 |
, ("lock", [t| Bool |], [| id |]) |
97 |
], SList)
|
|
97 |
]) |
|
98 | 98 |
, ("QueryJobs", |
99 | 99 |
[ ("ids", [t| [Int] |], [| map show |]) |
100 | 100 |
, ("fields", [t| [String] |], [| id |]) |
101 |
], SList)
|
|
101 |
]) |
|
102 | 102 |
, ("QueryExports", |
103 | 103 |
[ ("nodes", [t| [String] |], [| id |]) |
104 | 104 |
, ("lock", [t| Bool |], [| id |]) |
105 |
], SList)
|
|
105 |
]) |
|
106 | 106 |
, ("QueryConfigValues", |
107 |
[ ("fields", [t| [String] |], [| id |]) ],
|
|
108 |
SList)
|
|
109 |
, ("QueryClusterInfo", [], SList)
|
|
107 |
[ ("fields", [t| [String] |], [| id |]) ] |
|
108 |
) |
|
109 |
, ("QueryClusterInfo", []) |
|
110 | 110 |
, ("QueryTags", |
111 | 111 |
[ ("kind", [t| String |], [| id |]) |
112 | 112 |
, ("name", [t| String |], [| id |]) |
113 |
], SList)
|
|
113 |
]) |
|
114 | 114 |
, ("SubmitJob", |
115 |
[ ("job", [t| [OpCode] |], [| id |]) ],
|
|
116 |
SList)
|
|
115 |
[ ("job", [t| [OpCode] |], [| id |]) ] |
|
116 |
) |
|
117 | 117 |
, ("SubmitManyJobs", |
118 |
[ ("ops", [t| [[OpCode]] |], [| id |]) ],
|
|
119 |
SList)
|
|
118 |
[ ("ops", [t| [[OpCode]] |], [| id |]) ] |
|
119 |
) |
|
120 | 120 |
, ("WaitForJobChange", |
121 | 121 |
[ ("job", [t| Int |], [| id |]) |
122 | 122 |
, ("fields", [t| [String]|], [| id |]) |
123 | 123 |
, ("prev_job", [t| JSValue |], [| id |]) |
124 | 124 |
, ("prev_log", [t| JSValue |], [| id |]) |
125 | 125 |
, ("tmout", [t| Int |], [| id |]) |
126 |
], SList)
|
|
126 |
]) |
|
127 | 127 |
, ("ArchiveJob", |
128 |
[ ("job", [t| Int |], [| show |]) ],
|
|
129 |
SList)
|
|
128 |
[ ("job", [t| Int |], [| show |]) ] |
|
129 |
) |
|
130 | 130 |
, ("AutoArchiveJobs", |
131 | 131 |
[ ("age", [t| Int |], [| id |]) |
132 | 132 |
, ("tmout", [t| Int |], [| id |]) |
133 |
], SList)
|
|
133 |
]) |
|
134 | 134 |
, ("CancelJob", |
135 |
[("job", [t| Int |], [| show |]) ],
|
|
136 |
SList)
|
|
135 |
[ ("job", [t| Int |], [| show |]) ]
|
|
136 |
) |
|
137 | 137 |
, ("SetDrainFlag", |
138 |
[ ("flag", [t| Bool |], [| id |]) ],
|
|
139 |
SList)
|
|
138 |
[ ("flag", [t| Bool |], [| id |]) ] |
|
139 |
) |
|
140 | 140 |
, ("SetWatcherPause", |
141 |
[ ("duration", [t| Double |], [| (: []) |]) ],
|
|
142 |
SList)
|
|
141 |
[ ("duration", [t| Double |], [| id |]) ]
|
|
142 |
) |
|
143 | 143 |
]) |
144 | 144 |
|
145 | 145 |
-- | The serialisation of LuxiOps into strings in messages. |
Also available in: Unified diff