root / src / Ganeti / Hs2Py / OpDoc.hs @ c2fe6008
History | View | Annotate | Download (14.2 kB)
1 |
{-| Implementation of the doc strings for the opcodes. |
---|---|
2 |
|
3 |
-} |
4 |
|
5 |
{- |
6 |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. |
8 |
|
9 |
This program is free software; you can redistribute it and/or modify |
10 |
it under the terms of the GNU General Public License as published by |
11 |
the Free Software Foundation; either version 2 of the License, or |
12 |
(at your option) any later version. |
13 |
|
14 |
This program is distributed in the hope that it will be useful, but |
15 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 |
General Public License for more details. |
18 |
|
19 |
You should have received a copy of the GNU General Public License |
20 |
along with this program; if not, write to the Free Software |
21 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
22 |
02110-1301, USA. |
23 |
|
24 |
-} |
25 |
|
26 |
module Ganeti.Hs2Py.OpDoc where |
27 |
|
28 |
|
29 |
opClusterPostInit :: String |
30 |
opClusterPostInit = |
31 |
"Post cluster initialization.\n\ |
32 |
\\n\ |
33 |
\ This opcode does not touch the cluster at all. Its purpose is to run hooks\n\ |
34 |
\ after the cluster has been initialized." |
35 |
|
36 |
opClusterDestroy :: String |
37 |
opClusterDestroy = |
38 |
"Destroy the cluster.\n\ |
39 |
\\n\ |
40 |
\ This opcode has no other parameters. All the state is irreversibly\n\ |
41 |
\ lost after the execution of this opcode." |
42 |
|
43 |
opClusterQuery :: String |
44 |
opClusterQuery = |
45 |
"Query cluster information." |
46 |
|
47 |
opClusterVerify :: String |
48 |
opClusterVerify = |
49 |
"Submits all jobs necessary to verify the cluster." |
50 |
|
51 |
opClusterVerifyConfig :: String |
52 |
opClusterVerifyConfig = |
53 |
"Verify the cluster config." |
54 |
|
55 |
opClusterVerifyGroup :: String |
56 |
opClusterVerifyGroup = |
57 |
"Run verify on a node group from the cluster.\n\ |
58 |
\\n\ |
59 |
\ @type skip_checks: C{list}\n\ |
60 |
\ @ivar skip_checks: steps to be skipped from the verify process; this\n\ |
61 |
\ needs to be a subset of\n\ |
62 |
\ L{constants.VERIFY_OPTIONAL_CHECKS}; currently\n\ |
63 |
\ only L{constants.VERIFY_NPLUSONE_MEM} can be passed" |
64 |
|
65 |
opClusterVerifyDisks :: String |
66 |
opClusterVerifyDisks = |
67 |
"Verify the cluster disks." |
68 |
|
69 |
opGroupVerifyDisks :: String |
70 |
opGroupVerifyDisks = |
71 |
"Verifies the status of all disks in a node group.\n\ |
72 |
\\n\ |
73 |
\ Result: a tuple of three elements:\n\ |
74 |
\ - dict of node names with issues (values: error msg)\n\ |
75 |
\ - list of instances with degraded disks (that should be activated)\n\ |
76 |
\ - dict of instances with missing logical volumes (values: (node, vol)\n\ |
77 |
\ pairs with details about the missing volumes)\n\ |
78 |
\\n\ |
79 |
\ In normal operation, all lists should be empty. A non-empty instance\n\ |
80 |
\ list (3rd element of the result) is still ok (errors were fixed) but\n\ |
81 |
\ non-empty node list means some node is down, and probably there are\n\ |
82 |
\ unfixable drbd errors.\n\ |
83 |
\\n\ |
84 |
\ Note that only instances that are drbd-based are taken into\n\ |
85 |
\ consideration. This might need to be revisited in the future." |
86 |
|
87 |
opClusterRepairDiskSizes :: String |
88 |
opClusterRepairDiskSizes = |
89 |
"Verify the disk sizes of the instances and fixes configuration\n\ |
90 |
\ mismatches.\n\ |
91 |
\\n\ |
92 |
\ Parameters: optional instances list, in case we want to restrict the\n\ |
93 |
\ checks to only a subset of the instances.\n\ |
94 |
\\n\ |
95 |
\ Result: a list of tuples, (instance, disk, parameter, new-size) for\n\ |
96 |
\ changed configurations.\n\ |
97 |
\\n\ |
98 |
\ In normal operation, the list should be empty.\n\ |
99 |
\\n\ |
100 |
\ @type instances: list\n\ |
101 |
\ @ivar instances: the list of instances to check, or empty for all instances" |
102 |
|
103 |
opClusterConfigQuery :: String |
104 |
opClusterConfigQuery = |
105 |
"Query cluster configuration values." |
106 |
|
107 |
opClusterRename :: String |
108 |
opClusterRename = |
109 |
"Rename the cluster.\n\ |
110 |
\\n\ |
111 |
\ @type name: C{str}\n\ |
112 |
\ @ivar name: The new name of the cluster. The name and/or the master IP\n\ |
113 |
\ address will be changed to match the new name and its IP\n\ |
114 |
\ address." |
115 |
|
116 |
opClusterSetParams :: String |
117 |
opClusterSetParams = |
118 |
"Change the parameters of the cluster.\n\ |
119 |
\\n\ |
120 |
\ @type vg_name: C{str} or C{None}\n\ |
121 |
\ @ivar vg_name: The new volume group name or None to disable LVM usage." |
122 |
|
123 |
opClusterRedistConf :: String |
124 |
opClusterRedistConf = |
125 |
"Force a full push of the cluster configuration." |
126 |
|
127 |
opClusterActivateMasterIp :: String |
128 |
opClusterActivateMasterIp = |
129 |
"Activate the master IP on the master node." |
130 |
|
131 |
opClusterDeactivateMasterIp :: String |
132 |
opClusterDeactivateMasterIp = |
133 |
"Deactivate the master IP on the master node." |
134 |
|
135 |
opQuery :: String |
136 |
opQuery = |
137 |
"Query for resources/items.\n\ |
138 |
\\n\ |
139 |
\ @ivar what: Resources to query for, must be one of L{constants.QR_VIA_OP}\n\ |
140 |
\ @ivar fields: List of fields to retrieve\n\ |
141 |
\ @ivar qfilter: Query filter" |
142 |
|
143 |
opQueryFields :: String |
144 |
opQueryFields = |
145 |
"Query for available resource/item fields.\n\ |
146 |
\\n\ |
147 |
\ @ivar what: Resources to query for, must be one of L{constants.QR_VIA_OP}\n\ |
148 |
\ @ivar fields: List of fields to retrieve" |
149 |
|
150 |
opOobCommand :: String |
151 |
opOobCommand = |
152 |
"Interact with OOB." |
153 |
|
154 |
opRestrictedCommand :: String |
155 |
opRestrictedCommand = |
156 |
"Runs a restricted command on node(s)." |
157 |
|
158 |
opNodeRemove :: String |
159 |
opNodeRemove = |
160 |
"Remove a node.\n\ |
161 |
\\n\ |
162 |
\ @type node_name: C{str}\n\ |
163 |
\ @ivar node_name: The name of the node to remove. If the node still has\n\ |
164 |
\ instances on it, the operation will fail." |
165 |
|
166 |
opNodeAdd :: String |
167 |
opNodeAdd = |
168 |
"Add a node to the cluster.\n\ |
169 |
\\n\ |
170 |
\ @type node_name: C{str}\n\ |
171 |
\ @ivar node_name: The name of the node to add. This can be a short name,\n\ |
172 |
\ but it will be expanded to the FQDN.\n\ |
173 |
\ @type primary_ip: IP address\n\ |
174 |
\ @ivar primary_ip: The primary IP of the node. This will be ignored when\n\ |
175 |
\ the opcode is submitted, but will be filled during the\n\ |
176 |
\ node add (so it will be visible in the job query).\n\ |
177 |
\ @type secondary_ip: IP address\n\ |
178 |
\ @ivar secondary_ip: The secondary IP of the node. This needs to be passed\n\ |
179 |
\ if the cluster has been initialized in 'dual-network'\n\ |
180 |
\ mode, otherwise it must not be given.\n\ |
181 |
\ @type readd: C{bool}\n\ |
182 |
\ @ivar readd: Whether to re-add an existing node to the cluster. If\n\ |
183 |
\ this is not passed, then the operation will abort if the node\n\ |
184 |
\ name is already in the cluster; use this parameter to\n\ |
185 |
\ 'repair' a node that had its configuration broken, or was\n\ |
186 |
\ reinstalled without removal from the cluster.\n\ |
187 |
\ @type group: C{str}\n\ |
188 |
\ @ivar group: The node group to which this node will belong.\n\ |
189 |
\ @type vm_capable: C{bool}\n\ |
190 |
\ @ivar vm_capable: The vm_capable node attribute\n\ |
191 |
\ @type master_capable: C{bool}\n\ |
192 |
\ @ivar master_capable: The master_capable node attribute" |
193 |
|
194 |
opNodeQuery :: String |
195 |
opNodeQuery = |
196 |
"Compute the list of nodes." |
197 |
|
198 |
opNodeQueryvols :: String |
199 |
opNodeQueryvols = |
200 |
"Get list of volumes on node." |
201 |
|
202 |
opNodeQueryStorage :: String |
203 |
opNodeQueryStorage = |
204 |
"Get information on storage for node(s)." |
205 |
|
206 |
opNodeModifyStorage :: String |
207 |
opNodeModifyStorage = |
208 |
"Modifies the properies of a storage unit" |
209 |
|
210 |
opRepairNodeStorage :: String |
211 |
opRepairNodeStorage = |
212 |
"Repairs the volume group on a node." |
213 |
|
214 |
opNodeSetParams :: String |
215 |
opNodeSetParams = |
216 |
"Change the parameters of a node." |
217 |
|
218 |
opNodePowercycle :: String |
219 |
opNodePowercycle = |
220 |
"Tries to powercycle a node." |
221 |
|
222 |
opNodeMigrate :: String |
223 |
opNodeMigrate = |
224 |
"Migrate all instances from a node." |
225 |
|
226 |
opNodeEvacuate :: String |
227 |
opNodeEvacuate = |
228 |
"Evacuate instances off a number of nodes." |
229 |
|
230 |
opInstanceCreate :: String |
231 |
opInstanceCreate = |
232 |
"Create an instance.\n\ |
233 |
\\n\ |
234 |
\ @ivar instance_name: Instance name\n\ |
235 |
\ @ivar mode: Instance creation mode (one of\ |
236 |
\ L{constants.INSTANCE_CREATE_MODES})\n\ |
237 |
\ @ivar source_handshake: Signed handshake from source (remote import only)\n\ |
238 |
\ @ivar source_x509_ca: Source X509 CA in PEM format (remote import only)\n\ |
239 |
\ @ivar source_instance_name: Previous name of instance (remote import only)\n\ |
240 |
\ @ivar source_shutdown_timeout: Shutdown timeout used for source instance\n\ |
241 |
\ (remote import only)" |
242 |
|
243 |
opInstanceMultiAlloc :: String |
244 |
opInstanceMultiAlloc = |
245 |
"Allocates multiple instances." |
246 |
|
247 |
opInstanceReinstall :: String |
248 |
opInstanceReinstall = |
249 |
"Reinstall an instance's OS." |
250 |
|
251 |
opInstanceRemove :: String |
252 |
opInstanceRemove = |
253 |
"Remove an instance." |
254 |
|
255 |
opInstanceRename :: String |
256 |
opInstanceRename = |
257 |
"Rename an instance." |
258 |
|
259 |
opInstanceStartup :: String |
260 |
opInstanceStartup = |
261 |
"Startup an instance." |
262 |
|
263 |
opInstanceShutdown :: String |
264 |
opInstanceShutdown = |
265 |
"Shutdown an instance." |
266 |
|
267 |
opInstanceReboot :: String |
268 |
opInstanceReboot = |
269 |
"Reboot an instance." |
270 |
|
271 |
opInstanceReplaceDisks :: String |
272 |
opInstanceReplaceDisks = |
273 |
"Replace the disks of an instance." |
274 |
|
275 |
opInstanceFailover :: String |
276 |
opInstanceFailover = |
277 |
"Failover an instance." |
278 |
|
279 |
opInstanceMigrate :: String |
280 |
opInstanceMigrate = |
281 |
"Migrate an instance.\n\ |
282 |
\\n\ |
283 |
\ This migrates (without shutting down an instance) to its secondary\n\ |
284 |
\ node.\n\ |
285 |
\\n\ |
286 |
\ @ivar instance_name: the name of the instance\n\ |
287 |
\ @ivar mode: the migration mode (live, non-live or None for auto)" |
288 |
|
289 |
opInstanceMove :: String |
290 |
opInstanceMove = |
291 |
"Move an instance.\n\ |
292 |
\\n\ |
293 |
\ This move (with shutting down an instance and data copying) to an\n\ |
294 |
\ arbitrary node.\n\ |
295 |
\\n\ |
296 |
\ @ivar instance_name: the name of the instance\n\ |
297 |
\ @ivar target_node: the destination node" |
298 |
|
299 |
opInstanceConsole :: String |
300 |
opInstanceConsole = |
301 |
"Connect to an instance's console." |
302 |
|
303 |
opInstanceActivateDisks :: String |
304 |
opInstanceActivateDisks = |
305 |
"Activate an instance's disks." |
306 |
|
307 |
opInstanceDeactivateDisks :: String |
308 |
opInstanceDeactivateDisks = |
309 |
"Deactivate an instance's disks." |
310 |
|
311 |
opInstanceRecreateDisks :: String |
312 |
opInstanceRecreateDisks = |
313 |
"Recreate an instance's disks." |
314 |
|
315 |
opInstanceQuery :: String |
316 |
opInstanceQuery = |
317 |
"Compute the list of instances." |
318 |
|
319 |
opInstanceQueryData :: String |
320 |
opInstanceQueryData = |
321 |
"Compute the run-time status of instances." |
322 |
|
323 |
opInstanceSetParams :: String |
324 |
opInstanceSetParams = |
325 |
"Change the parameters of an instance." |
326 |
|
327 |
opInstanceGrowDisk :: String |
328 |
opInstanceGrowDisk = |
329 |
"Grow a disk of an instance." |
330 |
|
331 |
opInstanceChangeGroup :: String |
332 |
opInstanceChangeGroup = |
333 |
"Moves an instance to another node group." |
334 |
|
335 |
opGroupAdd :: String |
336 |
opGroupAdd = |
337 |
"Add a node group to the cluster." |
338 |
|
339 |
opGroupAssignNodes :: String |
340 |
opGroupAssignNodes = |
341 |
"Assign nodes to a node group." |
342 |
|
343 |
opGroupQuery :: String |
344 |
opGroupQuery = |
345 |
"Compute the list of node groups." |
346 |
|
347 |
opGroupSetParams :: String |
348 |
opGroupSetParams = |
349 |
"Change the parameters of a node group." |
350 |
|
351 |
opGroupRemove :: String |
352 |
opGroupRemove = |
353 |
"Remove a node group from the cluster." |
354 |
|
355 |
opGroupRename :: String |
356 |
opGroupRename = |
357 |
"Rename a node group in the cluster." |
358 |
|
359 |
opGroupEvacuate :: String |
360 |
opGroupEvacuate = |
361 |
"Evacuate a node group in the cluster." |
362 |
|
363 |
opOsDiagnose :: String |
364 |
opOsDiagnose = |
365 |
"Compute the list of guest operating systems." |
366 |
|
367 |
opExtStorageDiagnose :: String |
368 |
opExtStorageDiagnose = |
369 |
"Compute the list of external storage providers." |
370 |
|
371 |
opBackupQuery :: String |
372 |
opBackupQuery = |
373 |
"Compute the list of exported images." |
374 |
|
375 |
opBackupPrepare :: String |
376 |
opBackupPrepare = |
377 |
"Prepares an instance export.\n\ |
378 |
\\n\ |
379 |
\ @ivar instance_name: Instance name\n\ |
380 |
\ @ivar mode: Export mode (one of L{constants.EXPORT_MODES})" |
381 |
|
382 |
opBackupExport :: String |
383 |
opBackupExport = |
384 |
"Export an instance.\n\ |
385 |
\\n\ |
386 |
\ For local exports, the export destination is the node name. For\n\ |
387 |
\ remote exports, the export destination is a list of tuples, each\n\ |
388 |
\ consisting of hostname/IP address, port, magic, HMAC and HMAC\n\ |
389 |
\ salt. The HMAC is calculated using the cluster domain secret over\n\ |
390 |
\ the value \"${index}:${hostname}:${port}\". The destination X509 CA\n\ |
391 |
\ must be a signed certificate.\n\ |
392 |
\\n\ |
393 |
\ @ivar mode: Export mode (one of L{constants.EXPORT_MODES})\n\ |
394 |
\ @ivar target_node: Export destination\n\ |
395 |
\ @ivar x509_key_name: X509 key to use (remote export only)\n\ |
396 |
\ @ivar destination_x509_ca: Destination X509 CA in PEM format (remote\n\ |
397 |
\ export only)" |
398 |
|
399 |
opBackupRemove :: String |
400 |
opBackupRemove = |
401 |
"Remove an instance's export." |
402 |
|
403 |
opTagsGet :: String |
404 |
opTagsGet = |
405 |
"Returns the tags of the given object." |
406 |
|
407 |
opTagsSearch :: String |
408 |
opTagsSearch = |
409 |
"Searches the tags in the cluster for a given pattern." |
410 |
|
411 |
opTagsSet :: String |
412 |
opTagsSet = |
413 |
"Add a list of tags on a given object." |
414 |
|
415 |
opTagsDel :: String |
416 |
opTagsDel = |
417 |
"Remove a list of tags from a given object." |
418 |
|
419 |
opTestDelay :: String |
420 |
opTestDelay = |
421 |
"Sleeps for a configured amount of time.\n\ |
422 |
\\n\ |
423 |
\ This is used just for debugging and testing.\n\ |
424 |
\\n\ |
425 |
\ Parameters:\n\ |
426 |
\ - duration: the time to sleep, in seconds\n\ |
427 |
\ - on_master: if true, sleep on the master\n\ |
428 |
\ - on_nodes: list of nodes in which to sleep\n\ |
429 |
\\n\ |
430 |
\ If the on_master parameter is true, it will execute a sleep on the\n\ |
431 |
\ master (before any node sleep).\n\ |
432 |
\\n\ |
433 |
\ If the on_nodes list is not empty, it will sleep on those nodes\n\ |
434 |
\ (after the sleep on the master, if that is enabled).\n\ |
435 |
\\n\ |
436 |
\ As an additional feature, the case of duration < 0 will be reported\n\ |
437 |
\ as an execution error, so this opcode can be used as a failure\n\ |
438 |
\ generator. The case of duration == 0 will not be treated specially." |
439 |
|
440 |
opTestAllocator :: String |
441 |
opTestAllocator = |
442 |
"Allocator framework testing.\n\ |
443 |
\\n\ |
444 |
\ This opcode has two modes:\n\ |
445 |
\ - gather and return allocator input for a given mode (allocate new\n\ |
446 |
\ or replace secondary) and a given instance definition (direction\n\ |
447 |
\ 'in')\n\ |
448 |
\ - run a selected allocator for a given operation (as above) and\n\ |
449 |
\ return the allocator output (direction 'out')" |
450 |
|
451 |
opTestJqueue :: String |
452 |
opTestJqueue = |
453 |
"Utility opcode to test some aspects of the job queue." |
454 |
|
455 |
opTestDummy :: String |
456 |
opTestDummy = |
457 |
"Utility opcode used by unittests." |
458 |
|
459 |
opNetworkAdd :: String |
460 |
opNetworkAdd = |
461 |
"Add an IP network to the cluster." |
462 |
|
463 |
opNetworkRemove :: String |
464 |
opNetworkRemove = |
465 |
"Remove an existing network from the cluster.\n\ |
466 |
\ Must not be connected to any nodegroup." |
467 |
|
468 |
opNetworkSetParams :: String |
469 |
opNetworkSetParams = |
470 |
"Modify Network's parameters except for IPv4 subnet" |
471 |
|
472 |
opNetworkConnect :: String |
473 |
opNetworkConnect = |
474 |
"Connect a Network to a specific Nodegroup with the defined netparams\n\ |
475 |
\ (mode, link). Nics in this Network will inherit those params.\n\ |
476 |
\ Produce errors if a NIC (that its not already assigned to a network)\n\ |
477 |
\ has an IP that is contained in the Network this will produce error\ |
478 |
\ unless\n\ |
479 |
\ --no-conflicts-check is passed." |
480 |
|
481 |
opNetworkDisconnect :: String |
482 |
opNetworkDisconnect = |
483 |
"Disconnect a Network from a Nodegroup. Produce errors if NICs are\n\ |
484 |
\ present in the Network unless --no-conficts-check option is passed." |
485 |
|
486 |
opNetworkQuery :: String |
487 |
opNetworkQuery = |
488 |
"Compute the list of networks." |