Statistics
| Branch: | Tag: | Revision:

root / lib / rpc_defs.py @ 60154921

History | View | Annotate | Download (19.9 kB)

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
  - Timeout (e.g. L{TMO_NORMAL}), or callback receiving all arguments in a
28
    tuple to calculate timeout
29
  - List of arguments as tuples
30

31
    - Name as string
32
    - Argument kind used for encoding/decoding
33
    - Description for docstring (can be C{None})
34

35
  - Custom body encoder (e.g. for preparing per-node bodies)
36
  - Return value wrapper (e.g. for deserializing into L{objects}-based objects)
37
  - Short call description for docstring
38

39
"""
40

    
41
from ganeti import utils
42
from ganeti import objects
43

    
44

    
45
# Guidelines for choosing timeouts:
46
# - call used during watcher: timeout of 1min, _TMO_URGENT
47
# - trivial (but be sure it is trivial) (e.g. reading a file): 5min, _TMO_FAST
48
# - other calls: 15 min, _TMO_NORMAL
49
# - special calls (instance add, etc.): either _TMO_SLOW (1h) or huge timeouts
50
TMO_URGENT = 60 # one minute
51
TMO_FAST = 5 * 60 # five minutes
52
TMO_NORMAL = 15 * 60 # 15 minutes
53
TMO_SLOW = 3600 # one hour
54
TMO_4HRS = 4 * 3600
55
TMO_1DAY = 86400
56

    
57
SINGLE = "single-node"
58
MULTI = "multi-node"
59

    
60
# Constants for encoding/decoding
61
(ED_OBJECT_DICT,
62
 ED_OBJECT_DICT_LIST,
63
 ED_INST_DICT,
64
 ED_INST_DICT_HVP_BEP,
65
 ED_NODE_TO_DISK_DICT,
66
 ED_INST_DICT_OSP,
67
 ED_IMPEXP_IO,
68
 ED_FILE_DETAILS,
69
 ED_FINALIZE_EXPORT_DISKS,
70
 ED_COMPRESS,
71
 ED_BLOCKDEV_RENAME) = range(1, 12)
72

    
73

    
74
def _Prepare(calls):
75
  """Converts list of calls to dictionary.
76

77
  """
78
  return utils.SequenceToDict(calls)
79

    
80

    
81
def _MigrationStatusPostProc(result):
82
  """Post-processor for L{rpc.RpcRunner.call_instance_get_migration_status}.
83

84
  """
85
  if not result.fail_msg and result.payload is not None:
86
    result.payload = objects.MigrationStatus.FromDict(result.payload)
87
  return result
88

    
89

    
90
def _BlockdevFindPostProc(result):
91
  """Post-processor for L{rpc.RpcRunner.call_blockdev_find}.
92

93
  """
94
  if not result.fail_msg and result.payload is not None:
95
    result.payload = objects.BlockDevStatus.FromDict(result.payload)
96
  return result
97

    
98

    
99
def _BlockdevGetMirrorStatusPostProc(result):
100
  """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus}.
101

102
  """
103
  if not result.fail_msg:
104
    result.payload = map(objects.BlockDevStatus.FromDict, result.payload)
105
  return result
106

    
107

    
108
def _BlockdevGetMirrorStatusMultiPostProc(result):
109
  """Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus_multi}.
110

111
  """
112
  if not result.fail_msg:
113
    for idx, (success, status) in enumerate(result.payload):
114
      if success:
115
        result.payload[idx] = (success, objects.BlockDevStatus.FromDict(status))
116

    
117
  return result
118

    
119

    
120
def _OsGetPostProc(result):
121
  """Post-processor for L{rpc.RpcRunner.call_os_get}.
122

123
  """
124
  if not result.fail_msg and isinstance(result.payload, dict):
125
    result.payload = objects.OS.FromDict(result.payload)
126
  return result
127

    
128

    
129
def _ImpExpStatusPostProc(result):
130
  """Post-processor for import/export status.
131

132
  @rtype: Payload containing list of L{objects.ImportExportStatus} instances
133
  @return: Returns a list of the state of each named import/export or None if
134
           a status couldn't be retrieved
135

136
  """
137
  if not result.fail_msg:
138
    decoded = []
139

    
140
    for i in result.payload:
141
      if i is None:
142
        decoded.append(None)
143
        continue
144
      decoded.append(objects.ImportExportStatus.FromDict(i))
145

    
146
    result.payload = decoded
147

    
148
  return result
149

    
150

    
151
def _TestDelayTimeout((duration, )):
152
  """Calculate timeout for "test_delay" RPC.
153

154
  """
155
  return int(duration + 5)
156

    
157

    
158
_FILE_STORAGE_CALLS = [
159
  ("file_storage_dir_create", SINGLE, TMO_FAST, [
160
    ("file_storage_dir", None, "File storage directory"),
161
    ], None, None, "Create the given file storage directory"),
162
  ("file_storage_dir_remove", SINGLE, TMO_FAST, [
163
    ("file_storage_dir", None, "File storage directory"),
164
    ], None, None, "Remove the given file storage directory"),
165
  ("file_storage_dir_rename", SINGLE, TMO_FAST, [
166
    ("old_file_storage_dir", None, "Old name"),
167
    ("new_file_storage_dir", None, "New name"),
168
    ], None, None, "Rename file storage directory"),
169
  ]
170

    
171
_STORAGE_CALLS = [
172
  ("storage_list", MULTI, TMO_NORMAL, [
173
    ("su_name", None, None),
174
    ("su_args", None, None),
175
    ("name", None, None),
176
    ("fields", None, None),
177
    ], None, None, "Get list of storage units"),
178
  ("storage_modify", SINGLE, TMO_NORMAL, [
179
    ("su_name", None, None),
180
    ("su_args", None, None),
181
    ("name", None, None),
182
    ("changes", None, None),
183
    ], None, None, "Modify a storage unit"),
184
  ("storage_execute", SINGLE, TMO_NORMAL, [
185
    ("su_name", None, None),
186
    ("su_args", None, None),
187
    ("name", None, None),
188
    ("op", None, None),
189
    ], None, None, "Executes an operation on a storage unit"),
190
  ]
191

    
192
_INSTANCE_CALLS = [
193
  ("instance_info", SINGLE, TMO_URGENT, [
194
    ("instance", None, "Instance name"),
195
    ("hname", None, "Hypervisor type"),
196
    ], None, None, "Returns information about a single instance"),
197
  ("all_instances_info", MULTI, TMO_URGENT, [
198
    ("hypervisor_list", None, "Hypervisors to query for instances"),
199
    ], None, None,
200
   "Returns information about all instances on the given nodes"),
201
  ("instance_list", MULTI, TMO_URGENT, [
202
    ("hypervisor_list", None, "Hypervisors to query for instances"),
203
    ], None, None, "Returns the list of running instances on the given nodes"),
204
  ("instance_reboot", SINGLE, TMO_NORMAL, [
205
    ("inst", ED_INST_DICT, "Instance object"),
206
    ("reboot_type", None, None),
207
    ("shutdown_timeout", None, None),
208
    ], None, None, "Returns the list of running instances on the given nodes"),
209
  ("instance_shutdown", SINGLE, TMO_NORMAL, [
210
    ("instance", ED_INST_DICT, "Instance object"),
211
    ("timeout", None, None),
212
    ], None, None, "Stops an instance"),
213
  ("instance_run_rename", SINGLE, TMO_SLOW, [
214
    ("instance", ED_INST_DICT, "Instance object"),
215
    ("old_name", None, None),
216
    ("debug", None, None),
217
    ], None, None, "Run the OS rename script for an instance"),
218
  ("instance_migratable", SINGLE, TMO_NORMAL, [
219
    ("instance", ED_INST_DICT, "Instance object"),
220
    ], None, None, "Checks whether the given instance can be migrated"),
221
  ("migration_info", SINGLE, TMO_NORMAL, [
222
    ("instance", ED_INST_DICT, "Instance object"),
223
    ], None, None,
224
    "Gather the information necessary to prepare an instance migration"),
225
  ("accept_instance", SINGLE, TMO_NORMAL, [
226
    ("instance", ED_INST_DICT, "Instance object"),
227
    ("info", None, "Result for the call_migration_info call"),
228
    ("target", None, "Target hostname (usually an IP address)"),
229
    ], None, None, "Prepare a node to accept an instance"),
230
  ("instance_finalize_migration_dst", SINGLE, TMO_NORMAL, [
231
    ("instance", ED_INST_DICT, "Instance object"),
232
    ("info", None, "Result for the call_migration_info call"),
233
    ("success", None, "Whether the migration was a success or failure"),
234
    ], None, None, "Finalize any target-node migration specific operation"),
235
  ("instance_migrate", SINGLE, TMO_SLOW, [
236
    ("instance", ED_INST_DICT, "Instance object"),
237
    ("target", None, "Target node name"),
238
    ("live", None, "Whether the migration should be done live or not"),
239
    ], None, None, "Migrate an instance"),
240
  ("instance_finalize_migration_src", SINGLE, TMO_SLOW, [
241
    ("instance", ED_INST_DICT, "Instance object"),
242
    ("success", None, "Whether the migration succeeded or not"),
243
    ("live", None, "Whether the user requested a live migration or not"),
244
    ], None, None, "Finalize the instance migration on the source node"),
245
  ("instance_get_migration_status", SINGLE, TMO_SLOW, [
246
    ("instance", ED_INST_DICT, "Instance object"),
247
    ], None, _MigrationStatusPostProc, "Report migration status"),
248
  ("instance_start", SINGLE, TMO_NORMAL, [
249
    ("instance_hvp_bep", ED_INST_DICT_HVP_BEP, None),
250
    ("startup_paused", None, None),
251
    ], None, None, "Starts an instance"),
252
  ("instance_os_add", SINGLE, TMO_1DAY, [
253
    ("instance_osp", ED_INST_DICT_OSP, None),
254
    ("reinstall", None, None),
255
    ("debug", None, None),
256
    ], None, None, "Starts an instance"),
257
  ]
258

    
259
_IMPEXP_CALLS = [
260
  ("import_start", SINGLE, TMO_NORMAL, [
261
    ("opts", ED_OBJECT_DICT, None),
262
    ("instance", ED_INST_DICT, None),
263
    ("component", None, None),
264
    ("dest", ED_IMPEXP_IO, "Import destination"),
265
    ], None, None, "Starts an import daemon"),
266
  ("export_start", SINGLE, TMO_NORMAL, [
267
    ("opts", ED_OBJECT_DICT, None),
268
    ("host", None, None),
269
    ("port", None, None),
270
    ("instance", ED_INST_DICT, None),
271
    ("component", None, None),
272
    ("source", ED_IMPEXP_IO, "Export source"),
273
    ], None, None, "Starts an export daemon"),
274
  ("impexp_status", SINGLE, TMO_FAST, [
275
    ("names", None, "Import/export names"),
276
    ], None, _ImpExpStatusPostProc, "Gets the status of an import or export"),
277
  ("impexp_abort", SINGLE, TMO_NORMAL, [
278
    ("name", None, "Import/export name"),
279
    ], None, None, "Aborts an import or export"),
280
  ("impexp_cleanup", SINGLE, TMO_NORMAL, [
281
    ("name", None, "Import/export name"),
282
    ], None, None, "Cleans up after an import or export"),
283
  ("export_info", SINGLE, TMO_FAST, [
284
    ("path", None, None),
285
    ], None, None, "Queries the export information in a given path"),
286
  ("finalize_export", SINGLE, TMO_NORMAL, [
287
    ("instance", ED_INST_DICT, None),
288
    ("snap_disks", ED_FINALIZE_EXPORT_DISKS, None),
289
    ], None, None, "Request the completion of an export operation"),
290
  ("export_list", MULTI, TMO_FAST, [], None, None,
291
   "Gets the stored exports list"),
292
  ("export_remove", SINGLE, TMO_FAST, [
293
    ("export", None, None),
294
    ], None, None, "Requests removal of a given export"),
295
  ]
296

    
297
_X509_CALLS = [
298
  ("x509_cert_create", SINGLE, TMO_NORMAL, [
299
    ("validity", None, "Validity in seconds"),
300
    ], None, None, "Creates a new X509 certificate for SSL/TLS"),
301
  ("x509_cert_remove", SINGLE, TMO_NORMAL, [
302
    ("name", None, "Certificate name"),
303
    ], None, None, "Removes a X509 certificate"),
304
  ]
305

    
306
_BLOCKDEV_CALLS = [
307
  ("bdev_sizes", MULTI, TMO_URGENT, [
308
    ("devices", None, None),
309
    ], None, None,
310
   "Gets the sizes of requested block devices present on a node"),
311
  ("blockdev_create", SINGLE, TMO_NORMAL, [
312
    ("bdev", ED_OBJECT_DICT, None),
313
    ("size", None, None),
314
    ("owner", None, None),
315
    ("on_primary", None, None),
316
    ("info", None, None),
317
    ], None, None, "Request creation of a given block device"),
318
  ("blockdev_wipe", SINGLE, TMO_SLOW, [
319
    ("bdev", ED_OBJECT_DICT, None),
320
    ("offset", None, None),
321
    ("size", None, None),
322
    ], None, None,
323
    "Request wipe at given offset with given size of a block device"),
324
  ("blockdev_remove", SINGLE, TMO_NORMAL, [
325
    ("bdev", ED_OBJECT_DICT, None),
326
    ], None, None, "Request removal of a given block device"),
327
  ("blockdev_pause_resume_sync", SINGLE, TMO_NORMAL, [
328
    ("disks", ED_OBJECT_DICT_LIST, None),
329
    ("pause", None, None),
330
    ], None, None, "Request a pause/resume of given block device"),
331
  ("blockdev_assemble", SINGLE, TMO_NORMAL, [
332
    ("disk", ED_OBJECT_DICT, None),
333
    ("owner", None, None),
334
    ("on_primary", None, None),
335
    ("idx", None, None),
336
    ], None, None, "Request assembling of a given block device"),
337
  ("blockdev_shutdown", SINGLE, TMO_NORMAL, [
338
    ("disk", ED_OBJECT_DICT, None),
339
    ], None, None, "Request shutdown of a given block device"),
340
  ("blockdev_addchildren", SINGLE, TMO_NORMAL, [
341
    ("bdev", ED_OBJECT_DICT, None),
342
    ("ndevs", ED_OBJECT_DICT_LIST, None),
343
    ], None, None,
344
   "Request adding a list of children to a (mirroring) device"),
345
  ("blockdev_removechildren", SINGLE, TMO_NORMAL, [
346
    ("bdev", ED_OBJECT_DICT, None),
347
    ("ndevs", ED_OBJECT_DICT_LIST, None),
348
    ], None, None,
349
   "Request removing a list of children from a (mirroring) device"),
350
  ("blockdev_close", SINGLE, TMO_NORMAL, [
351
    ("instance_name", None, None),
352
    ("disks", ED_OBJECT_DICT_LIST, None),
353
    ], None, None, "Closes the given block devices"),
354
  ("blockdev_getsize", SINGLE, TMO_NORMAL, [
355
    ("disks", ED_OBJECT_DICT_LIST, None),
356
    ], None, None, "Returns the size of the given disks"),
357
  ("drbd_disconnect_net", MULTI, TMO_NORMAL, [
358
    ("nodes_ip", None, None),
359
    ("disks", ED_OBJECT_DICT_LIST, None),
360
    ], None, None, "Disconnects the network of the given drbd devices"),
361
  ("drbd_attach_net", MULTI, TMO_NORMAL, [
362
    ("nodes_ip", None, None),
363
    ("disks", ED_OBJECT_DICT_LIST, None),
364
    ("instance_name", None, None),
365
    ("multimaster", None, None),
366
    ], None, None, "Connects the given DRBD devices"),
367
  ("drbd_wait_sync", MULTI, TMO_SLOW, [
368
    ("nodes_ip", None, None),
369
    ("disks", ED_OBJECT_DICT_LIST, None),
370
    ], None, None,
371
   "Waits for the synchronization of drbd devices is complete"),
372
  ("blockdev_grow", SINGLE, TMO_NORMAL, [
373
    ("cf_bdev", ED_OBJECT_DICT, None),
374
    ("amount", None, None),
375
    ("dryrun", None, None),
376
    ], None, None, "Request a snapshot of the given block device"),
377
  ("blockdev_export", SINGLE, TMO_1DAY, [
378
    ("cf_bdev", ED_OBJECT_DICT, None),
379
    ("dest_node", None, None),
380
    ("dest_path", None, None),
381
    ("cluster_name", None, None),
382
    ], None, None, "Export a given disk to another node"),
383
  ("blockdev_snapshot", SINGLE, TMO_NORMAL, [
384
    ("cf_bdev", ED_OBJECT_DICT, None),
385
    ], None, None, "Export a given disk to another node"),
386
  ("blockdev_rename", SINGLE, TMO_NORMAL, [
387
    ("devlist", ED_BLOCKDEV_RENAME, None),
388
    ], None, None, "Request rename of the given block devices"),
389
  ("blockdev_find", SINGLE, TMO_NORMAL, [
390
    ("disk", ED_OBJECT_DICT, None),
391
    ], None, _BlockdevFindPostProc,
392
    "Request identification of a given block device"),
393
  ("blockdev_getmirrorstatus", SINGLE, TMO_NORMAL, [
394
    ("disks", ED_OBJECT_DICT_LIST, None),
395
    ], None, _BlockdevGetMirrorStatusPostProc,
396
    "Request status of a (mirroring) device"),
397
  ("blockdev_getmirrorstatus_multi", MULTI, TMO_NORMAL, [
398
    ("node_disks", ED_NODE_TO_DISK_DICT, None),
399
    ], None, _BlockdevGetMirrorStatusMultiPostProc,
400
    "Request status of (mirroring) devices from multiple nodes"),
401
  ]
402

    
403
_OS_CALLS = [
404
  ("os_diagnose", MULTI, TMO_FAST, [], None, None,
405
   "Request a diagnose of OS definitions"),
406
  ("os_validate", MULTI, TMO_FAST, [
407
    ("required", None, None),
408
    ("name", None, None),
409
    ("checks", None, None),
410
    ("params", None, None),
411
    ], None, None, "Run a validation routine for a given OS"),
412
  ("os_get", SINGLE, TMO_FAST, [
413
    ("name", None, None),
414
    ], None, _OsGetPostProc, "Returns an OS definition"),
415
  ]
416

    
417
_NODE_CALLS = [
418
  ("node_has_ip_address", SINGLE, TMO_FAST, [
419
    ("address", None, "IP address"),
420
    ], None, None, "Checks if a node has the given IP address"),
421
  ("node_info", MULTI, TMO_URGENT, [
422
    ("vg_names", None,
423
     "Names of the volume groups to ask for disk space information"),
424
    ("hv_names", None,
425
     "Names of the hypervisors to ask for node information"),
426
    ], None, None, "Return node information"),
427
  ("node_verify", MULTI, TMO_NORMAL, [
428
    ("checkdict", None, None),
429
    ("cluster_name", None, None),
430
    ], None, None, "Request verification of given parameters"),
431
  ("node_volumes", MULTI, TMO_FAST, [], None, None,
432
   "Gets all volumes on node(s)"),
433
  ("node_demote_from_mc", SINGLE, TMO_FAST, [], None, None,
434
   "Demote a node from the master candidate role"),
435
  ("node_powercycle", SINGLE, TMO_NORMAL, [
436
    ("hypervisor", None, "Hypervisor type"),
437
    ], None, None, "Tries to powercycle a node"),
438
  ]
439

    
440
_MISC_CALLS = [
441
  ("lv_list", MULTI, TMO_URGENT, [
442
    ("vg_name", None, None),
443
    ], None, None, "Gets the logical volumes present in a given volume group"),
444
  ("vg_list", MULTI, TMO_URGENT, [], None, None, "Gets the volume group list"),
445
  ("bridges_exist", SINGLE, TMO_URGENT, [
446
    ("bridges_list", None, "Bridges which must be present on remote node"),
447
    ], None, None, "Checks if a node has all the bridges given"),
448
  ("etc_hosts_modify", SINGLE, TMO_NORMAL, [
449
    ("mode", None,
450
     "Mode to operate; currently L{constants.ETC_HOSTS_ADD} or"
451
     " L{constants.ETC_HOSTS_REMOVE}"),
452
    ("name", None, "Hostname to be modified"),
453
    ("ip", None, "IP address (L{constants.ETC_HOSTS_ADD} only)"),
454
    ], None, None, "Modify hosts file with name"),
455
  ("drbd_helper", MULTI, TMO_URGENT, [], None, None, "Gets DRBD helper"),
456
  ("run_oob", SINGLE, TMO_NORMAL, [
457
    ("oob_program", None, None),
458
    ("command", None, None),
459
    ("remote_node", None, None),
460
    ("timeout", None, None),
461
    ], None, None, "Runs out-of-band command"),
462
  ("hooks_runner", MULTI, TMO_NORMAL, [
463
    ("hpath", None, None),
464
    ("phase", None, None),
465
    ("env", None, None),
466
    ], None, None, "Call the hooks runner"),
467
  ("iallocator_runner", SINGLE, TMO_NORMAL, [
468
    ("name", None, "Iallocator name"),
469
    ("idata", None, "JSON-encoded input string"),
470
    ], None, None, "Call an iallocator on a remote node"),
471
  ("test_delay", MULTI, _TestDelayTimeout, [
472
    ("duration", None, None),
473
    ], None, None, "Sleep for a fixed time on given node(s)"),
474
  ("hypervisor_validate_params", MULTI, TMO_NORMAL, [
475
    ("hvname", None, "Hypervisor name"),
476
    ("hvfull", None, "Parameters to be validated"),
477
    ], None, None, "Validate hypervisor params"),
478
  ]
479

    
480
CALLS = {
481
  "RpcClientDefault": \
482
    _Prepare(_IMPEXP_CALLS + _X509_CALLS + _OS_CALLS + _NODE_CALLS +
483
             _FILE_STORAGE_CALLS + _MISC_CALLS + _INSTANCE_CALLS +
484
             _BLOCKDEV_CALLS + _STORAGE_CALLS),
485
  "RpcClientJobQueue": _Prepare([
486
    ("jobqueue_update", MULTI, TMO_URGENT, [
487
      ("file_name", None, None),
488
      ("content", ED_COMPRESS, None),
489
      ], None, None, "Update job queue file"),
490
    ("jobqueue_purge", SINGLE, TMO_NORMAL, [], None, None, "Purge job queue"),
491
    ("jobqueue_rename", MULTI, TMO_URGENT, [
492
      ("rename", None, None),
493
      ], None, None, "Rename job queue file"),
494
    ]),
495
  "RpcClientBootstrap": _Prepare([
496
    ("node_start_master_daemons", SINGLE, TMO_FAST, [
497
      ("no_voting", None, None),
498
      ], None, None, "Starts master daemons on a node"),
499
    ("node_activate_master_ip", SINGLE, TMO_FAST, [
500
      ("master_params", ED_OBJECT_DICT, "Network parameters of the master"),
501
      ("use_external_mip_script", None,
502
       "Whether to use the user-provided master IP address setup script"),
503
      ], None, None,
504
      "Activates master IP on a node"),
505
    ("node_stop_master", SINGLE, TMO_FAST, [], None, None,
506
     "Deactivates master IP and stops master daemons on a node"),
507
    ("node_deactivate_master_ip", SINGLE, TMO_FAST, [
508
      ("master_params", ED_OBJECT_DICT, "Network parameters of the master"),
509
      ("use_external_mip_script", None,
510
       "Whether to use the user-provided master IP address setup script"),
511
      ], None, None,
512
     "Deactivates master IP on a node"),
513
    ("node_change_master_netmask", SINGLE, TMO_FAST, [
514
      ("old_netmask", None, "The old value of the netmask"),
515
      ("netmask", None, "The new value of the netmask"),
516
      ("master_ip", None, "The master IP"),
517
      ("master_netdev", None, "The master network device"),
518
      ], None, None, "Change master IP netmask"),
519
    ("node_leave_cluster", SINGLE, TMO_NORMAL, [
520
      ("modify_ssh_setup", None, None),
521
      ], None, None,
522
     "Requests a node to clean the cluster information it has"),
523
    ("master_info", MULTI, TMO_URGENT, [], None, None, "Query master info"),
524
    ("version", MULTI, TMO_URGENT, [], None, None, "Query node version"),
525
    ]),
526
  "RpcClientConfig": _Prepare([
527
    ("upload_file", MULTI, TMO_NORMAL, [
528
      ("file_name", ED_FILE_DETAILS, None),
529
      ], None, None, "Upload a file"),
530
    ("write_ssconf_files", MULTI, TMO_NORMAL, [
531
      ("values", None, None),
532
      ], None, None, "Write ssconf files"),
533
    ]),
534
  }