rpc._RpcClientBase: Add check for number of arguments
[ganeti-local] / lib / rpc_defs.py
1 #
2 #
3
4 # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
20
21 """RPC definitions for communication between master and node daemons.
22
23 RPC definition fields:
24
25   - Name as string
26   - L{SINGLE} for single-node calls, L{MULTI} for multi-node
27   - Name resolver option(s), can be callable receiving all arguments in a tuple
28   - Timeout (e.g. L{TMO_NORMAL}), or callback receiving all arguments in a
29     tuple to calculate timeout
30   - List of arguments as tuples
31
32     - Name as string
33     - Argument kind used for encoding/decoding
34     - Description for docstring (can be C{None})
35
36   - Custom body encoder (e.g. for preparing per-node bodies)
37   - Return value wrapper (e.g. for deserializing into L{objects}-based objects)
38   - Short call description for docstring
39
40 """
41
42 from ganeti import utils
43 from ganeti import objects
44
45
46 # Guidelines for choosing timeouts:
47 # - call used during watcher: timeout of 1min, _TMO_URGENT
48 # - trivial (but be sure it is trivial) (e.g. reading a file): 5min, _TMO_FAST
49 # - other calls: 15 min, _TMO_NORMAL
50 # - special calls (instance add, etc.): either _TMO_SLOW (1h) or huge timeouts
51 TMO_URGENT = 60 # one minute
52 TMO_FAST = 5 * 60 # five minutes
53 TMO_NORMAL = 15 * 60 # 15 minutes
54 TMO_SLOW = 3600 # one hour
55 TMO_4HRS = 4 * 3600
56 TMO_1DAY = 86400
57
58 SINGLE = "single-node"
59 MULTI = "multi-node"
60
61 ACCEPT_OFFLINE_NODE = object()
62
63 # Constants for encoding/decoding
64 (ED_OBJECT_DICT,
65  ED_OBJECT_DICT_LIST,
66  ED_INST_DICT,
67  ED_INST_DICT_HVP_BEP,
68  ED_NODE_TO_DISK_DICT,
69  ED_INST_DICT_OSP,
70  ED_IMPEXP_IO,
71  ED_FILE_DETAILS,
72  ED_FINALIZE_EXPORT_DISKS,
73  ED_COMPRESS,
74  ED_BLOCKDEV_RENAME) = range(1, 12)
75
76
77 def _Prepare(calls):
78   """Converts list of calls to dictionary.
79
80   """
81   return utils.SequenceToDict(calls)
82
83
84 def _MigrationStatusPostProc(result):
85   """Post-processor for L{rpc.RpcRunner.call_instance_get_migration_status}.
86
87   """
88   if not result.fail_msg and result.payload is not None:
89     result.payload = objects.MigrationStatus.FromDict(result.payload)
90   return result
91
92
93 def _BlockdevFindPostProc(result):
94   """Post-processor for L{rpc.RpcRunner.call_blockdev_find}.
95
96   """
97   if not result.fail_msg and result.payload is not None:
98     result.payload = objects.BlockDevStatus.FromDict(result.payload)
99   return result
100
101
102 def _BlockdevGetMirrorStatusPostProc(result):
103   """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus}.
104
105   """
106   if not result.fail_msg:
107     result.payload = map(objects.BlockDevStatus.FromDict, result.payload)
108   return result
109
110
111 def _BlockdevGetMirrorStatusMultiPreProc(node, args):
112   """Prepares the appropriate node values for blockdev_getmirrorstatus_multi.
113
114   """
115   # there should be only one argument to this RPC, already holding a
116   # node->disks dictionary, we just need to extract the value for the
117   # current node
118   assert len(args) == 1
119   return [args[0][node]]
120
121
122 def _BlockdevGetMirrorStatusMultiPostProc(result):
123   """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus_multi}.
124
125   """
126   if not result.fail_msg:
127     for idx, (success, status) in enumerate(result.payload):
128       if success:
129         result.payload[idx] = (success, objects.BlockDevStatus.FromDict(status))
130
131   return result
132
133
134 def _OsGetPostProc(result):
135   """Post-processor for L{rpc.RpcRunner.call_os_get}.
136
137   """
138   if not result.fail_msg and isinstance(result.payload, dict):
139     result.payload = objects.OS.FromDict(result.payload)
140   return result
141
142
143 def _ImpExpStatusPostProc(result):
144   """Post-processor for import/export status.
145
146   @rtype: Payload containing list of L{objects.ImportExportStatus} instances
147   @return: Returns a list of the state of each named import/export or None if
148            a status couldn't be retrieved
149
150   """
151   if not result.fail_msg:
152     decoded = []
153
154     for i in result.payload:
155       if i is None:
156         decoded.append(None)
157         continue
158       decoded.append(objects.ImportExportStatus.FromDict(i))
159
160     result.payload = decoded
161
162   return result
163
164
165 def _TestDelayTimeout((duration, )):
166   """Calculate timeout for "test_delay" RPC.
167
168   """
169   return int(duration + 5)
170
171
172 _FILE_STORAGE_CALLS = [
173   ("file_storage_dir_create", SINGLE, None, TMO_FAST, [
174     ("file_storage_dir", None, "File storage directory"),
175     ], None, None, "Create the given file storage directory"),
176   ("file_storage_dir_remove", SINGLE, None, TMO_FAST, [
177     ("file_storage_dir", None, "File storage directory"),
178     ], None, None, "Remove the given file storage directory"),
179   ("file_storage_dir_rename", SINGLE, None, TMO_FAST, [
180     ("old_file_storage_dir", None, "Old name"),
181     ("new_file_storage_dir", None, "New name"),
182     ], None, None, "Rename file storage directory"),
183   ]
184
185 _STORAGE_CALLS = [
186   ("storage_list", MULTI, None, TMO_NORMAL, [
187     ("su_name", None, None),
188     ("su_args", None, None),
189     ("name", None, None),
190     ("fields", None, None),
191     ], None, None, "Get list of storage units"),
192   ("storage_modify", SINGLE, None, TMO_NORMAL, [
193     ("su_name", None, None),
194     ("su_args", None, None),
195     ("name", None, None),
196     ("changes", None, None),
197     ], None, None, "Modify a storage unit"),
198   ("storage_execute", SINGLE, None, TMO_NORMAL, [
199     ("su_name", None, None),
200     ("su_args", None, None),
201     ("name", None, None),
202     ("op", None, None),
203     ], None, None, "Executes an operation on a storage unit"),
204   ]
205
206 _INSTANCE_CALLS = [
207   ("instance_info", SINGLE, None, TMO_URGENT, [
208     ("instance", None, "Instance name"),
209     ("hname", None, "Hypervisor type"),
210     ], None, None, "Returns information about a single instance"),
211   ("all_instances_info", MULTI, None, TMO_URGENT, [
212     ("hypervisor_list", None, "Hypervisors to query for instances"),
213     ], None, None,
214    "Returns information about all instances on the given nodes"),
215   ("instance_list", MULTI, None, TMO_URGENT, [
216     ("hypervisor_list", None, "Hypervisors to query for instances"),
217     ], None, None, "Returns the list of running instances on the given nodes"),
218   ("instance_reboot", SINGLE, None, TMO_NORMAL, [
219     ("inst", ED_INST_DICT, "Instance object"),
220     ("reboot_type", None, None),
221     ("shutdown_timeout", None, None),
222     ], None, None, "Returns the list of running instances on the given nodes"),
223   ("instance_shutdown", SINGLE, None, TMO_NORMAL, [
224     ("instance", ED_INST_DICT, "Instance object"),
225     ("timeout", None, None),
226     ], None, None, "Stops an instance"),
227   ("instance_run_rename", SINGLE, None, TMO_SLOW, [
228     ("instance", ED_INST_DICT, "Instance object"),
229     ("old_name", None, None),
230     ("debug", None, None),
231     ], None, None, "Run the OS rename script for an instance"),
232   ("instance_migratable", SINGLE, None, TMO_NORMAL, [
233     ("instance", ED_INST_DICT, "Instance object"),
234     ], None, None, "Checks whether the given instance can be migrated"),
235   ("migration_info", SINGLE, None, TMO_NORMAL, [
236     ("instance", ED_INST_DICT, "Instance object"),
237     ], None, None,
238     "Gather the information necessary to prepare an instance migration"),
239   ("accept_instance", SINGLE, None, TMO_NORMAL, [
240     ("instance", ED_INST_DICT, "Instance object"),
241     ("info", None, "Result for the call_migration_info call"),
242     ("target", None, "Target hostname (usually an IP address)"),
243     ], None, None, "Prepare a node to accept an instance"),
244   ("instance_finalize_migration_dst", SINGLE, None, TMO_NORMAL, [
245     ("instance", ED_INST_DICT, "Instance object"),
246     ("info", None, "Result for the call_migration_info call"),
247     ("success", None, "Whether the migration was a success or failure"),
248     ], None, None, "Finalize any target-node migration specific operation"),
249   ("instance_migrate", SINGLE, None, TMO_SLOW, [
250     ("instance", ED_INST_DICT, "Instance object"),
251     ("target", None, "Target node name"),
252     ("live", None, "Whether the migration should be done live or not"),
253     ], None, None, "Migrate an instance"),
254   ("instance_finalize_migration_src", SINGLE, None, TMO_SLOW, [
255     ("instance", ED_INST_DICT, "Instance object"),
256     ("success", None, "Whether the migration succeeded or not"),
257     ("live", None, "Whether the user requested a live migration or not"),
258     ], None, None, "Finalize the instance migration on the source node"),
259   ("instance_get_migration_status", SINGLE, None, TMO_SLOW, [
260     ("instance", ED_INST_DICT, "Instance object"),
261     ], None, _MigrationStatusPostProc, "Report migration status"),
262   ("instance_start", SINGLE, None, TMO_NORMAL, [
263     ("instance_hvp_bep", ED_INST_DICT_HVP_BEP, None),
264     ("startup_paused", None, None),
265     ], None, None, "Starts an instance"),
266   ("instance_os_add", SINGLE, None, TMO_1DAY, [
267     ("instance_osp", ED_INST_DICT_OSP, None),
268     ("reinstall", None, None),
269     ("debug", None, None),
270     ], None, None, "Starts an instance"),
271   ]
272
273 _IMPEXP_CALLS = [
274   ("import_start", SINGLE, None, TMO_NORMAL, [
275     ("opts", ED_OBJECT_DICT, None),
276     ("instance", ED_INST_DICT, None),
277     ("component", None, None),
278     ("dest", ED_IMPEXP_IO, "Import destination"),
279     ], None, None, "Starts an import daemon"),
280   ("export_start", SINGLE, None, TMO_NORMAL, [
281     ("opts", ED_OBJECT_DICT, None),
282     ("host", None, None),
283     ("port", None, None),
284     ("instance", ED_INST_DICT, None),
285     ("component", None, None),
286     ("source", ED_IMPEXP_IO, "Export source"),
287     ], None, None, "Starts an export daemon"),
288   ("impexp_status", SINGLE, None, TMO_FAST, [
289     ("names", None, "Import/export names"),
290     ], None, _ImpExpStatusPostProc, "Gets the status of an import or export"),
291   ("impexp_abort", SINGLE, None, TMO_NORMAL, [
292     ("name", None, "Import/export name"),
293     ], None, None, "Aborts an import or export"),
294   ("impexp_cleanup", SINGLE, None, TMO_NORMAL, [
295     ("name", None, "Import/export name"),
296     ], None, None, "Cleans up after an import or export"),
297   ("export_info", SINGLE, None, TMO_FAST, [
298     ("path", None, None),
299     ], None, None, "Queries the export information in a given path"),
300   ("finalize_export", SINGLE, None, TMO_NORMAL, [
301     ("instance", ED_INST_DICT, None),
302     ("snap_disks", ED_FINALIZE_EXPORT_DISKS, None),
303     ], None, None, "Request the completion of an export operation"),
304   ("export_list", MULTI, None, TMO_FAST, [], None, None,
305    "Gets the stored exports list"),
306   ("export_remove", SINGLE, None, TMO_FAST, [
307     ("export", None, None),
308     ], None, None, "Requests removal of a given export"),
309   ]
310
311 _X509_CALLS = [
312   ("x509_cert_create", SINGLE, None, TMO_NORMAL, [
313     ("validity", None, "Validity in seconds"),
314     ], None, None, "Creates a new X509 certificate for SSL/TLS"),
315   ("x509_cert_remove", SINGLE, None, TMO_NORMAL, [
316     ("name", None, "Certificate name"),
317     ], None, None, "Removes a X509 certificate"),
318   ]
319
320 _BLOCKDEV_CALLS = [
321   ("bdev_sizes", MULTI, None, TMO_URGENT, [
322     ("devices", None, None),
323     ], None, None,
324    "Gets the sizes of requested block devices present on a node"),
325   ("blockdev_create", SINGLE, None, TMO_NORMAL, [
326     ("bdev", ED_OBJECT_DICT, None),
327     ("size", None, None),
328     ("owner", None, None),
329     ("on_primary", None, None),
330     ("info", None, None),
331     ], None, None, "Request creation of a given block device"),
332   ("blockdev_wipe", SINGLE, None, TMO_SLOW, [
333     ("bdev", ED_OBJECT_DICT, None),
334     ("offset", None, None),
335     ("size", None, None),
336     ], None, None,
337     "Request wipe at given offset with given size of a block device"),
338   ("blockdev_remove", SINGLE, None, TMO_NORMAL, [
339     ("bdev", ED_OBJECT_DICT, None),
340     ], None, None, "Request removal of a given block device"),
341   ("blockdev_pause_resume_sync", SINGLE, None, TMO_NORMAL, [
342     ("disks", ED_OBJECT_DICT_LIST, None),
343     ("pause", None, None),
344     ], None, None, "Request a pause/resume of given block device"),
345   ("blockdev_assemble", SINGLE, None, TMO_NORMAL, [
346     ("disk", ED_OBJECT_DICT, None),
347     ("owner", None, None),
348     ("on_primary", None, None),
349     ("idx", None, None),
350     ], None, None, "Request assembling of a given block device"),
351   ("blockdev_shutdown", SINGLE, None, TMO_NORMAL, [
352     ("disk", ED_OBJECT_DICT, None),
353     ], None, None, "Request shutdown of a given block device"),
354   ("blockdev_addchildren", SINGLE, None, TMO_NORMAL, [
355     ("bdev", ED_OBJECT_DICT, None),
356     ("ndevs", ED_OBJECT_DICT_LIST, None),
357     ], None, None,
358    "Request adding a list of children to a (mirroring) device"),
359   ("blockdev_removechildren", SINGLE, None, TMO_NORMAL, [
360     ("bdev", ED_OBJECT_DICT, None),
361     ("ndevs", ED_OBJECT_DICT_LIST, None),
362     ], None, None,
363    "Request removing a list of children from a (mirroring) device"),
364   ("blockdev_close", SINGLE, None, TMO_NORMAL, [
365     ("instance_name", None, None),
366     ("disks", ED_OBJECT_DICT_LIST, None),
367     ], None, None, "Closes the given block devices"),
368   ("blockdev_getsize", SINGLE, None, TMO_NORMAL, [
369     ("disks", ED_OBJECT_DICT_LIST, None),
370     ], None, None, "Returns the size of the given disks"),
371   ("drbd_disconnect_net", MULTI, None, TMO_NORMAL, [
372     ("nodes_ip", None, None),
373     ("disks", ED_OBJECT_DICT_LIST, None),
374     ], None, None, "Disconnects the network of the given drbd devices"),
375   ("drbd_attach_net", MULTI, None, TMO_NORMAL, [
376     ("nodes_ip", None, None),
377     ("disks", ED_OBJECT_DICT_LIST, None),
378     ("instance_name", None, None),
379     ("multimaster", None, None),
380     ], None, None, "Connects the given DRBD devices"),
381   ("drbd_wait_sync", MULTI, None, TMO_SLOW, [
382     ("nodes_ip", None, None),
383     ("disks", ED_OBJECT_DICT_LIST, None),
384     ], None, None,
385    "Waits for the synchronization of drbd devices is complete"),
386   ("blockdev_grow", SINGLE, None, TMO_NORMAL, [
387     ("cf_bdev", ED_OBJECT_DICT, None),
388     ("amount", None, None),
389     ("dryrun", None, None),
390     ], None, None, "Request a snapshot of the given block device"),
391   ("blockdev_export", SINGLE, None, TMO_1DAY, [
392     ("cf_bdev", ED_OBJECT_DICT, None),
393     ("dest_node", None, None),
394     ("dest_path", None, None),
395     ("cluster_name", None, None),
396     ], None, None, "Export a given disk to another node"),
397   ("blockdev_snapshot", SINGLE, None, TMO_NORMAL, [
398     ("cf_bdev", ED_OBJECT_DICT, None),
399     ], None, None, "Export a given disk to another node"),
400   ("blockdev_rename", SINGLE, None, TMO_NORMAL, [
401     ("devlist", ED_BLOCKDEV_RENAME, None),
402     ], None, None, "Request rename of the given block devices"),
403   ("blockdev_find", SINGLE, None, TMO_NORMAL, [
404     ("disk", ED_OBJECT_DICT, None),
405     ], None, _BlockdevFindPostProc,
406     "Request identification of a given block device"),
407   ("blockdev_getmirrorstatus", SINGLE, None, TMO_NORMAL, [
408     ("disks", ED_OBJECT_DICT_LIST, None),
409     ], None, _BlockdevGetMirrorStatusPostProc,
410     "Request status of a (mirroring) device"),
411   ("blockdev_getmirrorstatus_multi", MULTI, None, TMO_NORMAL, [
412     ("node_disks", ED_NODE_TO_DISK_DICT, None),
413     ], _BlockdevGetMirrorStatusMultiPreProc,
414    _BlockdevGetMirrorStatusMultiPostProc,
415     "Request status of (mirroring) devices from multiple nodes"),
416   ]
417
418 _OS_CALLS = [
419   ("os_diagnose", MULTI, None, TMO_FAST, [], None, None,
420    "Request a diagnose of OS definitions"),
421   ("os_validate", MULTI, None, TMO_FAST, [
422     ("required", None, None),
423     ("name", None, None),
424     ("checks", None, None),
425     ("params", None, None),
426     ], None, None, "Run a validation routine for a given OS"),
427   ("os_get", SINGLE, None, TMO_FAST, [
428     ("name", None, None),
429     ], None, _OsGetPostProc, "Returns an OS definition"),
430   ]
431
432 _NODE_CALLS = [
433   ("node_has_ip_address", SINGLE, None, TMO_FAST, [
434     ("address", None, "IP address"),
435     ], None, None, "Checks if a node has the given IP address"),
436   ("node_info", MULTI, None, TMO_URGENT, [
437     ("vg_names", None,
438      "Names of the volume groups to ask for disk space information"),
439     ("hv_names", None,
440      "Names of the hypervisors to ask for node information"),
441     ], None, None, "Return node information"),
442   ("node_verify", MULTI, None, TMO_NORMAL, [
443     ("checkdict", None, None),
444     ("cluster_name", None, None),
445     ], None, None, "Request verification of given parameters"),
446   ("node_volumes", MULTI, None, TMO_FAST, [], None, None,
447    "Gets all volumes on node(s)"),
448   ("node_demote_from_mc", SINGLE, None, TMO_FAST, [], None, None,
449    "Demote a node from the master candidate role"),
450   ("node_powercycle", SINGLE, ACCEPT_OFFLINE_NODE, TMO_NORMAL, [
451     ("hypervisor", None, "Hypervisor type"),
452     ], None, None, "Tries to powercycle a node"),
453   ]
454
455 _MISC_CALLS = [
456   ("lv_list", MULTI, None, TMO_URGENT, [
457     ("vg_name", None, None),
458     ], None, None, "Gets the logical volumes present in a given volume group"),
459   ("vg_list", MULTI, None, TMO_URGENT, [], None, None,
460    "Gets the volume group list"),
461   ("bridges_exist", SINGLE, None, TMO_URGENT, [
462     ("bridges_list", None, "Bridges which must be present on remote node"),
463     ], None, None, "Checks if a node has all the bridges given"),
464   ("etc_hosts_modify", SINGLE, None, TMO_NORMAL, [
465     ("mode", None,
466      "Mode to operate; currently L{constants.ETC_HOSTS_ADD} or"
467      " L{constants.ETC_HOSTS_REMOVE}"),
468     ("name", None, "Hostname to be modified"),
469     ("ip", None, "IP address (L{constants.ETC_HOSTS_ADD} only)"),
470     ], None, None, "Modify hosts file with name"),
471   ("drbd_helper", MULTI, None, TMO_URGENT, [], None, None, "Gets DRBD helper"),
472   ("run_oob", SINGLE, None, TMO_NORMAL, [
473     ("oob_program", None, None),
474     ("command", None, None),
475     ("remote_node", None, None),
476     ("timeout", None, None),
477     ], None, None, "Runs out-of-band command"),
478   ("hooks_runner", MULTI, None, TMO_NORMAL, [
479     ("hpath", None, None),
480     ("phase", None, None),
481     ("env", None, None),
482     ], None, None, "Call the hooks runner"),
483   ("iallocator_runner", SINGLE, None, TMO_NORMAL, [
484     ("name", None, "Iallocator name"),
485     ("idata", None, "JSON-encoded input string"),
486     ], None, None, "Call an iallocator on a remote node"),
487   ("test_delay", MULTI, None, _TestDelayTimeout, [
488     ("duration", None, None),
489     ], None, None, "Sleep for a fixed time on given node(s)"),
490   ("hypervisor_validate_params", MULTI, None, TMO_NORMAL, [
491     ("hvname", None, "Hypervisor name"),
492     ("hvfull", None, "Parameters to be validated"),
493     ], None, None, "Validate hypervisor params"),
494   ]
495
496 CALLS = {
497   "RpcClientDefault": \
498     _Prepare(_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS + _NODE_CALLS +
499              _FILE_STORAGE_CALLS + _MISC_CALLS + _INSTANCE_CALLS +
500              _BLOCKDEV_CALLS + _STORAGE_CALLS),
501   "RpcClientJobQueue": _Prepare([
502     ("jobqueue_update", MULTI, None, TMO_URGENT, [
503       ("file_name", None, None),
504       ("content", ED_COMPRESS, None),
505       ], None, None, "Update job queue file"),
506     ("jobqueue_purge", SINGLE, None, TMO_NORMAL, [], None, None,
507      "Purge job queue"),
508     ("jobqueue_rename", MULTI, None, TMO_URGENT, [
509       ("rename", None, None),
510       ], None, None, "Rename job queue file"),
511     ]),
512   "RpcClientBootstrap": _Prepare([
513     ("node_start_master_daemons", SINGLE, None, TMO_FAST, [
514       ("no_voting", None, None),
515       ], None, None, "Starts master daemons on a node"),
516     ("node_activate_master_ip", SINGLE, None, TMO_FAST, [
517       ("master_params", ED_OBJECT_DICT, "Network parameters of the master"),
518       ("use_external_mip_script", None,
519        "Whether to use the user-provided master IP address setup script"),
520       ], None, None,
521       "Activates master IP on a node"),
522     ("node_stop_master", SINGLE, None, TMO_FAST, [], None, None,
523      "Deactivates master IP and stops master daemons on a node"),
524     ("node_deactivate_master_ip", SINGLE, None, TMO_FAST, [
525       ("master_params", ED_OBJECT_DICT, "Network parameters of the master"),
526       ("use_external_mip_script", None,
527        "Whether to use the user-provided master IP address setup script"),
528       ], None, None,
529      "Deactivates master IP on a node"),
530     ("node_change_master_netmask", SINGLE, None, TMO_FAST, [
531       ("old_netmask", None, "The old value of the netmask"),
532       ("netmask", None, "The new value of the netmask"),
533       ("master_ip", None, "The master IP"),
534       ("master_netdev", None, "The master network device"),
535       ], None, None, "Change master IP netmask"),
536     ("node_leave_cluster", SINGLE, None, TMO_NORMAL, [
537       ("modify_ssh_setup", None, None),
538       ], None, None,
539      "Requests a node to clean the cluster information it has"),
540     ("master_info", MULTI, None, TMO_URGENT, [], None, None,
541      "Query master info"),
542     ("version", MULTI, None, TMO_URGENT, [], None, None, "Query node version"),
543     ]),
544   "RpcClientConfig": _Prepare([
545     ("upload_file", MULTI, None, TMO_NORMAL, [
546       ("file_name", ED_FILE_DETAILS, None),
547       ], None, None, "Upload a file"),
548     ("write_ssconf_files", MULTI, None, TMO_NORMAL, [
549       ("values", None, None),
550       ], None, None, "Write ssconf files"),
551     ]),
552   }