Revision fae980e5
b/htools/Ganeti/Luxi.hs | ||
---|---|---|
6 | 6 |
|
7 | 7 |
{- |
8 | 8 |
|
9 |
Copyright (C) 2009, 2010, 2011 Google Inc. |
|
9 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
|
|
10 | 10 |
|
11 | 11 |
This program is free software; you can redistribute it and/or modify |
12 | 12 |
it under the terms of the GNU General Public License as published by |
... | ... | |
77 | 77 |
|
78 | 78 |
-- | Currently supported Luxi operations and JSON serialization. |
79 | 79 |
$(genLuxiOp "LuxiOp" |
80 |
[("Query" ,
|
|
80 |
[(luxiReqQuery,
|
|
81 | 81 |
[ ("what", [t| QrViaLuxi |], [| id |]) |
82 | 82 |
, ("fields", [t| [String] |], [| id |]) |
83 | 83 |
, ("qfilter", [t| () |], [| const JSNull |]) |
84 | 84 |
]) |
85 |
, ("QueryNodes",
|
|
85 |
, (luxiReqQueryNodes,
|
|
86 | 86 |
[ ("names", [t| [String] |], [| id |]) |
87 | 87 |
, ("fields", [t| [String] |], [| id |]) |
88 | 88 |
, ("lock", [t| Bool |], [| id |]) |
89 | 89 |
]) |
90 |
, ("QueryGroups",
|
|
90 |
, (luxiReqQueryGroups,
|
|
91 | 91 |
[ ("names", [t| [String] |], [| id |]) |
92 | 92 |
, ("fields", [t| [String] |], [| id |]) |
93 | 93 |
, ("lock", [t| Bool |], [| id |]) |
94 | 94 |
]) |
95 |
, ("QueryInstances",
|
|
95 |
, (luxiReqQueryInstances,
|
|
96 | 96 |
[ ("names", [t| [String] |], [| id |]) |
97 | 97 |
, ("fields", [t| [String] |], [| id |]) |
98 | 98 |
, ("lock", [t| Bool |], [| id |]) |
99 | 99 |
]) |
100 |
, ("QueryJobs",
|
|
100 |
, (luxiReqQueryJobs,
|
|
101 | 101 |
[ ("ids", [t| [Int] |], [| map show |]) |
102 | 102 |
, ("fields", [t| [String] |], [| id |]) |
103 | 103 |
]) |
104 |
, ("QueryExports",
|
|
104 |
, (luxiReqQueryExports,
|
|
105 | 105 |
[ ("nodes", [t| [String] |], [| id |]) |
106 | 106 |
, ("lock", [t| Bool |], [| id |]) |
107 | 107 |
]) |
108 |
, ("QueryConfigValues",
|
|
108 |
, (luxiReqQueryConfigValues,
|
|
109 | 109 |
[ ("fields", [t| [String] |], [| id |]) ] |
110 | 110 |
) |
111 |
, ("QueryClusterInfo", [])
|
|
112 |
, ("QueryTags",
|
|
111 |
, (luxiReqQueryClusterInfo, [])
|
|
112 |
, (luxiReqQueryTags,
|
|
113 | 113 |
[ ("kind", [t| String |], [| id |]) |
114 | 114 |
, ("name", [t| String |], [| id |]) |
115 | 115 |
]) |
116 |
, ("SubmitJob",
|
|
116 |
, (luxiReqSubmitJob,
|
|
117 | 117 |
[ ("job", [t| [OpCode] |], [| id |]) ] |
118 | 118 |
) |
119 |
, ("SubmitManyJobs",
|
|
119 |
, (luxiReqSubmitManyJobs,
|
|
120 | 120 |
[ ("ops", [t| [[OpCode]] |], [| id |]) ] |
121 | 121 |
) |
122 |
, ("WaitForJobChange",
|
|
122 |
, (luxiReqWaitForJobChange,
|
|
123 | 123 |
[ ("job", [t| Int |], [| id |]) |
124 | 124 |
, ("fields", [t| [String]|], [| id |]) |
125 | 125 |
, ("prev_job", [t| JSValue |], [| id |]) |
126 | 126 |
, ("prev_log", [t| JSValue |], [| id |]) |
127 | 127 |
, ("tmout", [t| Int |], [| id |]) |
128 | 128 |
]) |
129 |
, ("ArchiveJob",
|
|
129 |
, (luxiReqArchiveJob,
|
|
130 | 130 |
[ ("job", [t| Int |], [| show |]) ] |
131 | 131 |
) |
132 |
, ("AutoArchiveJobs",
|
|
132 |
, (luxiReqAutoArchiveJobs,
|
|
133 | 133 |
[ ("age", [t| Int |], [| id |]) |
134 | 134 |
, ("tmout", [t| Int |], [| id |]) |
135 | 135 |
]) |
136 |
, ("CancelJob",
|
|
136 |
, (luxiReqCancelJob,
|
|
137 | 137 |
[ ("job", [t| Int |], [| show |]) ] |
138 | 138 |
) |
139 |
, ("SetDrainFlag",
|
|
139 |
, (luxiReqSetDrainFlag,
|
|
140 | 140 |
[ ("flag", [t| Bool |], [| id |]) ] |
141 | 141 |
) |
142 |
, ("SetWatcherPause",
|
|
142 |
, (luxiReqSetWatcherPause,
|
|
143 | 143 |
[ ("duration", [t| Double |], [| id |]) ] |
144 | 144 |
) |
145 | 145 |
]) |
Also available in: Unified diff