Revision dd6d2d09 lib/rpc_defs.py
b/lib/rpc_defs.py | ||
---|---|---|
24 | 24 |
|
25 | 25 |
- Name as string |
26 | 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 |
|
27 | 28 |
- Timeout (e.g. L{TMO_NORMAL}), or callback receiving all arguments in a |
28 | 29 |
tuple to calculate timeout |
29 | 30 |
- List of arguments as tuples |
... | ... | |
167 | 168 |
|
168 | 169 |
|
169 | 170 |
_FILE_STORAGE_CALLS = [ |
170 |
("file_storage_dir_create", SINGLE, TMO_FAST, [ |
|
171 |
("file_storage_dir_create", SINGLE, None, TMO_FAST, [
|
|
171 | 172 |
("file_storage_dir", None, "File storage directory"), |
172 | 173 |
], None, None, "Create the given file storage directory"), |
173 |
("file_storage_dir_remove", SINGLE, TMO_FAST, [ |
|
174 |
("file_storage_dir_remove", SINGLE, None, TMO_FAST, [
|
|
174 | 175 |
("file_storage_dir", None, "File storage directory"), |
175 | 176 |
], None, None, "Remove the given file storage directory"), |
176 |
("file_storage_dir_rename", SINGLE, TMO_FAST, [ |
|
177 |
("file_storage_dir_rename", SINGLE, None, TMO_FAST, [
|
|
177 | 178 |
("old_file_storage_dir", None, "Old name"), |
178 | 179 |
("new_file_storage_dir", None, "New name"), |
179 | 180 |
], None, None, "Rename file storage directory"), |
180 | 181 |
] |
181 | 182 |
|
182 | 183 |
_STORAGE_CALLS = [ |
183 |
("storage_list", MULTI, TMO_NORMAL, [ |
|
184 |
("storage_list", MULTI, None, TMO_NORMAL, [
|
|
184 | 185 |
("su_name", None, None), |
185 | 186 |
("su_args", None, None), |
186 | 187 |
("name", None, None), |
187 | 188 |
("fields", None, None), |
188 | 189 |
], None, None, "Get list of storage units"), |
189 |
("storage_modify", SINGLE, TMO_NORMAL, [ |
|
190 |
("storage_modify", SINGLE, None, TMO_NORMAL, [
|
|
190 | 191 |
("su_name", None, None), |
191 | 192 |
("su_args", None, None), |
192 | 193 |
("name", None, None), |
193 | 194 |
("changes", None, None), |
194 | 195 |
], None, None, "Modify a storage unit"), |
195 |
("storage_execute", SINGLE, TMO_NORMAL, [ |
|
196 |
("storage_execute", SINGLE, None, TMO_NORMAL, [
|
|
196 | 197 |
("su_name", None, None), |
197 | 198 |
("su_args", None, None), |
198 | 199 |
("name", None, None), |
... | ... | |
201 | 202 |
] |
202 | 203 |
|
203 | 204 |
_INSTANCE_CALLS = [ |
204 |
("instance_info", SINGLE, TMO_URGENT, [ |
|
205 |
("instance_info", SINGLE, None, TMO_URGENT, [
|
|
205 | 206 |
("instance", None, "Instance name"), |
206 | 207 |
("hname", None, "Hypervisor type"), |
207 | 208 |
], None, None, "Returns information about a single instance"), |
208 |
("all_instances_info", MULTI, TMO_URGENT, [ |
|
209 |
("all_instances_info", MULTI, None, TMO_URGENT, [
|
|
209 | 210 |
("hypervisor_list", None, "Hypervisors to query for instances"), |
210 | 211 |
], None, None, |
211 | 212 |
"Returns information about all instances on the given nodes"), |
212 |
("instance_list", MULTI, TMO_URGENT, [ |
|
213 |
("instance_list", MULTI, None, TMO_URGENT, [
|
|
213 | 214 |
("hypervisor_list", None, "Hypervisors to query for instances"), |
214 | 215 |
], None, None, "Returns the list of running instances on the given nodes"), |
215 |
("instance_reboot", SINGLE, TMO_NORMAL, [ |
|
216 |
("instance_reboot", SINGLE, None, TMO_NORMAL, [
|
|
216 | 217 |
("inst", ED_INST_DICT, "Instance object"), |
217 | 218 |
("reboot_type", None, None), |
218 | 219 |
("shutdown_timeout", None, None), |
219 | 220 |
], None, None, "Returns the list of running instances on the given nodes"), |
220 |
("instance_shutdown", SINGLE, TMO_NORMAL, [ |
|
221 |
("instance_shutdown", SINGLE, None, TMO_NORMAL, [
|
|
221 | 222 |
("instance", ED_INST_DICT, "Instance object"), |
222 | 223 |
("timeout", None, None), |
223 | 224 |
], None, None, "Stops an instance"), |
224 |
("instance_run_rename", SINGLE, TMO_SLOW, [ |
|
225 |
("instance_run_rename", SINGLE, None, TMO_SLOW, [
|
|
225 | 226 |
("instance", ED_INST_DICT, "Instance object"), |
226 | 227 |
("old_name", None, None), |
227 | 228 |
("debug", None, None), |
228 | 229 |
], None, None, "Run the OS rename script for an instance"), |
229 |
("instance_migratable", SINGLE, TMO_NORMAL, [ |
|
230 |
("instance_migratable", SINGLE, None, TMO_NORMAL, [
|
|
230 | 231 |
("instance", ED_INST_DICT, "Instance object"), |
231 | 232 |
], None, None, "Checks whether the given instance can be migrated"), |
232 |
("migration_info", SINGLE, TMO_NORMAL, [ |
|
233 |
("migration_info", SINGLE, None, TMO_NORMAL, [
|
|
233 | 234 |
("instance", ED_INST_DICT, "Instance object"), |
234 | 235 |
], None, None, |
235 | 236 |
"Gather the information necessary to prepare an instance migration"), |
236 |
("accept_instance", SINGLE, TMO_NORMAL, [ |
|
237 |
("accept_instance", SINGLE, None, TMO_NORMAL, [
|
|
237 | 238 |
("instance", ED_INST_DICT, "Instance object"), |
238 | 239 |
("info", None, "Result for the call_migration_info call"), |
239 | 240 |
("target", None, "Target hostname (usually an IP address)"), |
240 | 241 |
], None, None, "Prepare a node to accept an instance"), |
241 |
("instance_finalize_migration_dst", SINGLE, TMO_NORMAL, [ |
|
242 |
("instance_finalize_migration_dst", SINGLE, None, TMO_NORMAL, [
|
|
242 | 243 |
("instance", ED_INST_DICT, "Instance object"), |
243 | 244 |
("info", None, "Result for the call_migration_info call"), |
244 | 245 |
("success", None, "Whether the migration was a success or failure"), |
245 | 246 |
], None, None, "Finalize any target-node migration specific operation"), |
246 |
("instance_migrate", SINGLE, TMO_SLOW, [ |
|
247 |
("instance_migrate", SINGLE, None, TMO_SLOW, [
|
|
247 | 248 |
("instance", ED_INST_DICT, "Instance object"), |
248 | 249 |
("target", None, "Target node name"), |
249 | 250 |
("live", None, "Whether the migration should be done live or not"), |
250 | 251 |
], None, None, "Migrate an instance"), |
251 |
("instance_finalize_migration_src", SINGLE, TMO_SLOW, [ |
|
252 |
("instance_finalize_migration_src", SINGLE, None, TMO_SLOW, [
|
|
252 | 253 |
("instance", ED_INST_DICT, "Instance object"), |
253 | 254 |
("success", None, "Whether the migration succeeded or not"), |
254 | 255 |
("live", None, "Whether the user requested a live migration or not"), |
255 | 256 |
], None, None, "Finalize the instance migration on the source node"), |
256 |
("instance_get_migration_status", SINGLE, TMO_SLOW, [ |
|
257 |
("instance_get_migration_status", SINGLE, None, TMO_SLOW, [
|
|
257 | 258 |
("instance", ED_INST_DICT, "Instance object"), |
258 | 259 |
], None, _MigrationStatusPostProc, "Report migration status"), |
259 |
("instance_start", SINGLE, TMO_NORMAL, [ |
|
260 |
("instance_start", SINGLE, None, TMO_NORMAL, [
|
|
260 | 261 |
("instance_hvp_bep", ED_INST_DICT_HVP_BEP, None), |
261 | 262 |
("startup_paused", None, None), |
262 | 263 |
], None, None, "Starts an instance"), |
263 |
("instance_os_add", SINGLE, TMO_1DAY, [ |
|
264 |
("instance_os_add", SINGLE, None, TMO_1DAY, [
|
|
264 | 265 |
("instance_osp", ED_INST_DICT_OSP, None), |
265 | 266 |
("reinstall", None, None), |
266 | 267 |
("debug", None, None), |
... | ... | |
268 | 269 |
] |
269 | 270 |
|
270 | 271 |
_IMPEXP_CALLS = [ |
271 |
("import_start", SINGLE, TMO_NORMAL, [ |
|
272 |
("import_start", SINGLE, None, TMO_NORMAL, [
|
|
272 | 273 |
("opts", ED_OBJECT_DICT, None), |
273 | 274 |
("instance", ED_INST_DICT, None), |
274 | 275 |
("component", None, None), |
275 | 276 |
("dest", ED_IMPEXP_IO, "Import destination"), |
276 | 277 |
], None, None, "Starts an import daemon"), |
277 |
("export_start", SINGLE, TMO_NORMAL, [ |
|
278 |
("export_start", SINGLE, None, TMO_NORMAL, [
|
|
278 | 279 |
("opts", ED_OBJECT_DICT, None), |
279 | 280 |
("host", None, None), |
280 | 281 |
("port", None, None), |
... | ... | |
282 | 283 |
("component", None, None), |
283 | 284 |
("source", ED_IMPEXP_IO, "Export source"), |
284 | 285 |
], None, None, "Starts an export daemon"), |
285 |
("impexp_status", SINGLE, TMO_FAST, [ |
|
286 |
("impexp_status", SINGLE, None, TMO_FAST, [
|
|
286 | 287 |
("names", None, "Import/export names"), |
287 | 288 |
], None, _ImpExpStatusPostProc, "Gets the status of an import or export"), |
288 |
("impexp_abort", SINGLE, TMO_NORMAL, [ |
|
289 |
("impexp_abort", SINGLE, None, TMO_NORMAL, [
|
|
289 | 290 |
("name", None, "Import/export name"), |
290 | 291 |
], None, None, "Aborts an import or export"), |
291 |
("impexp_cleanup", SINGLE, TMO_NORMAL, [ |
|
292 |
("impexp_cleanup", SINGLE, None, TMO_NORMAL, [
|
|
292 | 293 |
("name", None, "Import/export name"), |
293 | 294 |
], None, None, "Cleans up after an import or export"), |
294 |
("export_info", SINGLE, TMO_FAST, [ |
|
295 |
("export_info", SINGLE, None, TMO_FAST, [
|
|
295 | 296 |
("path", None, None), |
296 | 297 |
], None, None, "Queries the export information in a given path"), |
297 |
("finalize_export", SINGLE, TMO_NORMAL, [ |
|
298 |
("finalize_export", SINGLE, None, TMO_NORMAL, [
|
|
298 | 299 |
("instance", ED_INST_DICT, None), |
299 | 300 |
("snap_disks", ED_FINALIZE_EXPORT_DISKS, None), |
300 | 301 |
], None, None, "Request the completion of an export operation"), |
301 |
("export_list", MULTI, TMO_FAST, [], None, None, |
|
302 |
("export_list", MULTI, None, TMO_FAST, [], None, None,
|
|
302 | 303 |
"Gets the stored exports list"), |
303 |
("export_remove", SINGLE, TMO_FAST, [ |
|
304 |
("export_remove", SINGLE, None, TMO_FAST, [
|
|
304 | 305 |
("export", None, None), |
305 | 306 |
], None, None, "Requests removal of a given export"), |
306 | 307 |
] |
307 | 308 |
|
308 | 309 |
_X509_CALLS = [ |
309 |
("x509_cert_create", SINGLE, TMO_NORMAL, [ |
|
310 |
("x509_cert_create", SINGLE, None, TMO_NORMAL, [
|
|
310 | 311 |
("validity", None, "Validity in seconds"), |
311 | 312 |
], None, None, "Creates a new X509 certificate for SSL/TLS"), |
312 |
("x509_cert_remove", SINGLE, TMO_NORMAL, [ |
|
313 |
("x509_cert_remove", SINGLE, None, TMO_NORMAL, [
|
|
313 | 314 |
("name", None, "Certificate name"), |
314 | 315 |
], None, None, "Removes a X509 certificate"), |
315 | 316 |
] |
316 | 317 |
|
317 | 318 |
_BLOCKDEV_CALLS = [ |
318 |
("bdev_sizes", MULTI, TMO_URGENT, [ |
|
319 |
("bdev_sizes", MULTI, None, TMO_URGENT, [
|
|
319 | 320 |
("devices", None, None), |
320 | 321 |
], None, None, |
321 | 322 |
"Gets the sizes of requested block devices present on a node"), |
322 |
("blockdev_create", SINGLE, TMO_NORMAL, [ |
|
323 |
("blockdev_create", SINGLE, None, TMO_NORMAL, [
|
|
323 | 324 |
("bdev", ED_OBJECT_DICT, None), |
324 | 325 |
("size", None, None), |
325 | 326 |
("owner", None, None), |
326 | 327 |
("on_primary", None, None), |
327 | 328 |
("info", None, None), |
328 | 329 |
], None, None, "Request creation of a given block device"), |
329 |
("blockdev_wipe", SINGLE, TMO_SLOW, [ |
|
330 |
("blockdev_wipe", SINGLE, None, TMO_SLOW, [
|
|
330 | 331 |
("bdev", ED_OBJECT_DICT, None), |
331 | 332 |
("offset", None, None), |
332 | 333 |
("size", None, None), |
333 | 334 |
], None, None, |
334 | 335 |
"Request wipe at given offset with given size of a block device"), |
335 |
("blockdev_remove", SINGLE, TMO_NORMAL, [ |
|
336 |
("blockdev_remove", SINGLE, None, TMO_NORMAL, [
|
|
336 | 337 |
("bdev", ED_OBJECT_DICT, None), |
337 | 338 |
], None, None, "Request removal of a given block device"), |
338 |
("blockdev_pause_resume_sync", SINGLE, TMO_NORMAL, [ |
|
339 |
("blockdev_pause_resume_sync", SINGLE, None, TMO_NORMAL, [
|
|
339 | 340 |
("disks", ED_OBJECT_DICT_LIST, None), |
340 | 341 |
("pause", None, None), |
341 | 342 |
], None, None, "Request a pause/resume of given block device"), |
342 |
("blockdev_assemble", SINGLE, TMO_NORMAL, [ |
|
343 |
("blockdev_assemble", SINGLE, None, TMO_NORMAL, [
|
|
343 | 344 |
("disk", ED_OBJECT_DICT, None), |
344 | 345 |
("owner", None, None), |
345 | 346 |
("on_primary", None, None), |
346 | 347 |
("idx", None, None), |
347 | 348 |
], None, None, "Request assembling of a given block device"), |
348 |
("blockdev_shutdown", SINGLE, TMO_NORMAL, [ |
|
349 |
("blockdev_shutdown", SINGLE, None, TMO_NORMAL, [
|
|
349 | 350 |
("disk", ED_OBJECT_DICT, None), |
350 | 351 |
], None, None, "Request shutdown of a given block device"), |
351 |
("blockdev_addchildren", SINGLE, TMO_NORMAL, [ |
|
352 |
("blockdev_addchildren", SINGLE, None, TMO_NORMAL, [
|
|
352 | 353 |
("bdev", ED_OBJECT_DICT, None), |
353 | 354 |
("ndevs", ED_OBJECT_DICT_LIST, None), |
354 | 355 |
], None, None, |
355 | 356 |
"Request adding a list of children to a (mirroring) device"), |
356 |
("blockdev_removechildren", SINGLE, TMO_NORMAL, [ |
|
357 |
("blockdev_removechildren", SINGLE, None, TMO_NORMAL, [
|
|
357 | 358 |
("bdev", ED_OBJECT_DICT, None), |
358 | 359 |
("ndevs", ED_OBJECT_DICT_LIST, None), |
359 | 360 |
], None, None, |
360 | 361 |
"Request removing a list of children from a (mirroring) device"), |
361 |
("blockdev_close", SINGLE, TMO_NORMAL, [ |
|
362 |
("blockdev_close", SINGLE, None, TMO_NORMAL, [
|
|
362 | 363 |
("instance_name", None, None), |
363 | 364 |
("disks", ED_OBJECT_DICT_LIST, None), |
364 | 365 |
], None, None, "Closes the given block devices"), |
365 |
("blockdev_getsize", SINGLE, TMO_NORMAL, [ |
|
366 |
("blockdev_getsize", SINGLE, None, TMO_NORMAL, [
|
|
366 | 367 |
("disks", ED_OBJECT_DICT_LIST, None), |
367 | 368 |
], None, None, "Returns the size of the given disks"), |
368 |
("drbd_disconnect_net", MULTI, TMO_NORMAL, [ |
|
369 |
("drbd_disconnect_net", MULTI, None, TMO_NORMAL, [
|
|
369 | 370 |
("nodes_ip", None, None), |
370 | 371 |
("disks", ED_OBJECT_DICT_LIST, None), |
371 | 372 |
], None, None, "Disconnects the network of the given drbd devices"), |
372 |
("drbd_attach_net", MULTI, TMO_NORMAL, [ |
|
373 |
("drbd_attach_net", MULTI, None, TMO_NORMAL, [
|
|
373 | 374 |
("nodes_ip", None, None), |
374 | 375 |
("disks", ED_OBJECT_DICT_LIST, None), |
375 | 376 |
("instance_name", None, None), |
376 | 377 |
("multimaster", None, None), |
377 | 378 |
], None, None, "Connects the given DRBD devices"), |
378 |
("drbd_wait_sync", MULTI, TMO_SLOW, [ |
|
379 |
("drbd_wait_sync", MULTI, None, TMO_SLOW, [
|
|
379 | 380 |
("nodes_ip", None, None), |
380 | 381 |
("disks", ED_OBJECT_DICT_LIST, None), |
381 | 382 |
], None, None, |
382 | 383 |
"Waits for the synchronization of drbd devices is complete"), |
383 |
("blockdev_grow", SINGLE, TMO_NORMAL, [ |
|
384 |
("blockdev_grow", SINGLE, None, TMO_NORMAL, [
|
|
384 | 385 |
("cf_bdev", ED_OBJECT_DICT, None), |
385 | 386 |
("amount", None, None), |
386 | 387 |
("dryrun", None, None), |
387 | 388 |
], None, None, "Request a snapshot of the given block device"), |
388 |
("blockdev_export", SINGLE, TMO_1DAY, [ |
|
389 |
("blockdev_export", SINGLE, None, TMO_1DAY, [
|
|
389 | 390 |
("cf_bdev", ED_OBJECT_DICT, None), |
390 | 391 |
("dest_node", None, None), |
391 | 392 |
("dest_path", None, None), |
392 | 393 |
("cluster_name", None, None), |
393 | 394 |
], None, None, "Export a given disk to another node"), |
394 |
("blockdev_snapshot", SINGLE, TMO_NORMAL, [ |
|
395 |
("blockdev_snapshot", SINGLE, None, TMO_NORMAL, [
|
|
395 | 396 |
("cf_bdev", ED_OBJECT_DICT, None), |
396 | 397 |
], None, None, "Export a given disk to another node"), |
397 |
("blockdev_rename", SINGLE, TMO_NORMAL, [ |
|
398 |
("blockdev_rename", SINGLE, None, TMO_NORMAL, [
|
|
398 | 399 |
("devlist", ED_BLOCKDEV_RENAME, None), |
399 | 400 |
], None, None, "Request rename of the given block devices"), |
400 |
("blockdev_find", SINGLE, TMO_NORMAL, [ |
|
401 |
("blockdev_find", SINGLE, None, TMO_NORMAL, [
|
|
401 | 402 |
("disk", ED_OBJECT_DICT, None), |
402 | 403 |
], None, _BlockdevFindPostProc, |
403 | 404 |
"Request identification of a given block device"), |
404 |
("blockdev_getmirrorstatus", SINGLE, TMO_NORMAL, [ |
|
405 |
("blockdev_getmirrorstatus", SINGLE, None, TMO_NORMAL, [
|
|
405 | 406 |
("disks", ED_OBJECT_DICT_LIST, None), |
406 | 407 |
], None, _BlockdevGetMirrorStatusPostProc, |
407 | 408 |
"Request status of a (mirroring) device"), |
408 |
("blockdev_getmirrorstatus_multi", MULTI, TMO_NORMAL, [ |
|
409 |
("blockdev_getmirrorstatus_multi", MULTI, None, TMO_NORMAL, [
|
|
409 | 410 |
("node_disks", ED_NODE_TO_DISK_DICT, None), |
410 | 411 |
], _BlockdevGetMirrorStatusMultiPreProc, |
411 | 412 |
_BlockdevGetMirrorStatusMultiPostProc, |
... | ... | |
413 | 414 |
] |
414 | 415 |
|
415 | 416 |
_OS_CALLS = [ |
416 |
("os_diagnose", MULTI, TMO_FAST, [], None, None, |
|
417 |
("os_diagnose", MULTI, None, TMO_FAST, [], None, None,
|
|
417 | 418 |
"Request a diagnose of OS definitions"), |
418 |
("os_validate", MULTI, TMO_FAST, [ |
|
419 |
("os_validate", MULTI, None, TMO_FAST, [
|
|
419 | 420 |
("required", None, None), |
420 | 421 |
("name", None, None), |
421 | 422 |
("checks", None, None), |
422 | 423 |
("params", None, None), |
423 | 424 |
], None, None, "Run a validation routine for a given OS"), |
424 |
("os_get", SINGLE, TMO_FAST, [ |
|
425 |
("os_get", SINGLE, None, TMO_FAST, [
|
|
425 | 426 |
("name", None, None), |
426 | 427 |
], None, _OsGetPostProc, "Returns an OS definition"), |
427 | 428 |
] |
428 | 429 |
|
429 | 430 |
_NODE_CALLS = [ |
430 |
("node_has_ip_address", SINGLE, TMO_FAST, [ |
|
431 |
("node_has_ip_address", SINGLE, None, TMO_FAST, [
|
|
431 | 432 |
("address", None, "IP address"), |
432 | 433 |
], None, None, "Checks if a node has the given IP address"), |
433 |
("node_info", MULTI, TMO_URGENT, [ |
|
434 |
("node_info", MULTI, None, TMO_URGENT, [
|
|
434 | 435 |
("vg_names", None, |
435 | 436 |
"Names of the volume groups to ask for disk space information"), |
436 | 437 |
("hv_names", None, |
437 | 438 |
"Names of the hypervisors to ask for node information"), |
438 | 439 |
], None, None, "Return node information"), |
439 |
("node_verify", MULTI, TMO_NORMAL, [ |
|
440 |
("node_verify", MULTI, None, TMO_NORMAL, [
|
|
440 | 441 |
("checkdict", None, None), |
441 | 442 |
("cluster_name", None, None), |
442 | 443 |
], None, None, "Request verification of given parameters"), |
443 |
("node_volumes", MULTI, TMO_FAST, [], None, None, |
|
444 |
("node_volumes", MULTI, None, TMO_FAST, [], None, None,
|
|
444 | 445 |
"Gets all volumes on node(s)"), |
445 |
("node_demote_from_mc", SINGLE, TMO_FAST, [], None, None, |
|
446 |
("node_demote_from_mc", SINGLE, None, TMO_FAST, [], None, None,
|
|
446 | 447 |
"Demote a node from the master candidate role"), |
447 |
("node_powercycle", SINGLE, TMO_NORMAL, [ |
|
448 |
("node_powercycle", SINGLE, None, TMO_NORMAL, [
|
|
448 | 449 |
("hypervisor", None, "Hypervisor type"), |
449 | 450 |
], None, None, "Tries to powercycle a node"), |
450 | 451 |
] |
451 | 452 |
|
452 | 453 |
_MISC_CALLS = [ |
453 |
("lv_list", MULTI, TMO_URGENT, [ |
|
454 |
("lv_list", MULTI, None, TMO_URGENT, [
|
|
454 | 455 |
("vg_name", None, None), |
455 | 456 |
], None, None, "Gets the logical volumes present in a given volume group"), |
456 |
("vg_list", MULTI, TMO_URGENT, [], None, None, "Gets the volume group list"), |
|
457 |
("bridges_exist", SINGLE, TMO_URGENT, [ |
|
457 |
("vg_list", MULTI, None, TMO_URGENT, [], None, None, |
|
458 |
"Gets the volume group list"), |
|
459 |
("bridges_exist", SINGLE, None, TMO_URGENT, [ |
|
458 | 460 |
("bridges_list", None, "Bridges which must be present on remote node"), |
459 | 461 |
], None, None, "Checks if a node has all the bridges given"), |
460 |
("etc_hosts_modify", SINGLE, TMO_NORMAL, [ |
|
462 |
("etc_hosts_modify", SINGLE, None, TMO_NORMAL, [
|
|
461 | 463 |
("mode", None, |
462 | 464 |
"Mode to operate; currently L{constants.ETC_HOSTS_ADD} or" |
463 | 465 |
" L{constants.ETC_HOSTS_REMOVE}"), |
464 | 466 |
("name", None, "Hostname to be modified"), |
465 | 467 |
("ip", None, "IP address (L{constants.ETC_HOSTS_ADD} only)"), |
466 | 468 |
], None, None, "Modify hosts file with name"), |
467 |
("drbd_helper", MULTI, TMO_URGENT, [], None, None, "Gets DRBD helper"), |
|
468 |
("run_oob", SINGLE, TMO_NORMAL, [ |
|
469 |
("drbd_helper", MULTI, None, TMO_URGENT, [], None, None, "Gets DRBD helper"),
|
|
470 |
("run_oob", SINGLE, None, TMO_NORMAL, [
|
|
469 | 471 |
("oob_program", None, None), |
470 | 472 |
("command", None, None), |
471 | 473 |
("remote_node", None, None), |
472 | 474 |
("timeout", None, None), |
473 | 475 |
], None, None, "Runs out-of-band command"), |
474 |
("hooks_runner", MULTI, TMO_NORMAL, [ |
|
476 |
("hooks_runner", MULTI, None, TMO_NORMAL, [
|
|
475 | 477 |
("hpath", None, None), |
476 | 478 |
("phase", None, None), |
477 | 479 |
("env", None, None), |
478 | 480 |
], None, None, "Call the hooks runner"), |
479 |
("iallocator_runner", SINGLE, TMO_NORMAL, [ |
|
481 |
("iallocator_runner", SINGLE, None, TMO_NORMAL, [
|
|
480 | 482 |
("name", None, "Iallocator name"), |
481 | 483 |
("idata", None, "JSON-encoded input string"), |
482 | 484 |
], None, None, "Call an iallocator on a remote node"), |
483 |
("test_delay", MULTI, _TestDelayTimeout, [ |
|
485 |
("test_delay", MULTI, None, _TestDelayTimeout, [
|
|
484 | 486 |
("duration", None, None), |
485 | 487 |
], None, None, "Sleep for a fixed time on given node(s)"), |
486 |
("hypervisor_validate_params", MULTI, TMO_NORMAL, [ |
|
488 |
("hypervisor_validate_params", MULTI, None, TMO_NORMAL, [
|
|
487 | 489 |
("hvname", None, "Hypervisor name"), |
488 | 490 |
("hvfull", None, "Parameters to be validated"), |
489 | 491 |
], None, None, "Validate hypervisor params"), |
... | ... | |
495 | 497 |
_FILE_STORAGE_CALLS + _MISC_CALLS + _INSTANCE_CALLS + |
496 | 498 |
_BLOCKDEV_CALLS + _STORAGE_CALLS), |
497 | 499 |
"RpcClientJobQueue": _Prepare([ |
498 |
("jobqueue_update", MULTI, TMO_URGENT, [ |
|
500 |
("jobqueue_update", MULTI, None, TMO_URGENT, [
|
|
499 | 501 |
("file_name", None, None), |
500 | 502 |
("content", ED_COMPRESS, None), |
501 | 503 |
], None, None, "Update job queue file"), |
502 |
("jobqueue_purge", SINGLE, TMO_NORMAL, [], None, None, "Purge job queue"), |
|
503 |
("jobqueue_rename", MULTI, TMO_URGENT, [ |
|
504 |
("jobqueue_purge", SINGLE, None, TMO_NORMAL, [], None, None, |
|
505 |
"Purge job queue"), |
|
506 |
("jobqueue_rename", MULTI, None, TMO_URGENT, [ |
|
504 | 507 |
("rename", None, None), |
505 | 508 |
], None, None, "Rename job queue file"), |
506 | 509 |
]), |
507 | 510 |
"RpcClientBootstrap": _Prepare([ |
508 |
("node_start_master_daemons", SINGLE, TMO_FAST, [ |
|
511 |
("node_start_master_daemons", SINGLE, None, TMO_FAST, [
|
|
509 | 512 |
("no_voting", None, None), |
510 | 513 |
], None, None, "Starts master daemons on a node"), |
511 |
("node_activate_master_ip", SINGLE, TMO_FAST, [ |
|
514 |
("node_activate_master_ip", SINGLE, None, TMO_FAST, [
|
|
512 | 515 |
("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
513 | 516 |
("use_external_mip_script", None, |
514 | 517 |
"Whether to use the user-provided master IP address setup script"), |
515 | 518 |
], None, None, |
516 | 519 |
"Activates master IP on a node"), |
517 |
("node_stop_master", SINGLE, TMO_FAST, [], None, None, |
|
520 |
("node_stop_master", SINGLE, None, TMO_FAST, [], None, None,
|
|
518 | 521 |
"Deactivates master IP and stops master daemons on a node"), |
519 |
("node_deactivate_master_ip", SINGLE, TMO_FAST, [ |
|
522 |
("node_deactivate_master_ip", SINGLE, None, TMO_FAST, [
|
|
520 | 523 |
("master_params", ED_OBJECT_DICT, "Network parameters of the master"), |
521 | 524 |
("use_external_mip_script", None, |
522 | 525 |
"Whether to use the user-provided master IP address setup script"), |
523 | 526 |
], None, None, |
524 | 527 |
"Deactivates master IP on a node"), |
525 |
("node_change_master_netmask", SINGLE, TMO_FAST, [ |
|
528 |
("node_change_master_netmask", SINGLE, None, TMO_FAST, [
|
|
526 | 529 |
("old_netmask", None, "The old value of the netmask"), |
527 | 530 |
("netmask", None, "The new value of the netmask"), |
528 | 531 |
("master_ip", None, "The master IP"), |
529 | 532 |
("master_netdev", None, "The master network device"), |
530 | 533 |
], None, None, "Change master IP netmask"), |
531 |
("node_leave_cluster", SINGLE, TMO_NORMAL, [ |
|
534 |
("node_leave_cluster", SINGLE, None, TMO_NORMAL, [
|
|
532 | 535 |
("modify_ssh_setup", None, None), |
533 | 536 |
], None, None, |
534 | 537 |
"Requests a node to clean the cluster information it has"), |
535 |
("master_info", MULTI, TMO_URGENT, [], None, None, "Query master info"), |
|
536 |
("version", MULTI, TMO_URGENT, [], None, None, "Query node version"), |
|
538 |
("master_info", MULTI, None, TMO_URGENT, [], None, None, |
|
539 |
"Query master info"), |
|
540 |
("version", MULTI, None, TMO_URGENT, [], None, None, "Query node version"), |
|
537 | 541 |
]), |
538 | 542 |
"RpcClientConfig": _Prepare([ |
539 |
("upload_file", MULTI, TMO_NORMAL, [ |
|
543 |
("upload_file", MULTI, None, TMO_NORMAL, [
|
|
540 | 544 |
("file_name", ED_FILE_DETAILS, None), |
541 | 545 |
], None, None, "Upload a file"), |
542 |
("write_ssconf_files", MULTI, TMO_NORMAL, [ |
|
546 |
("write_ssconf_files", MULTI, None, TMO_NORMAL, [
|
|
543 | 547 |
("values", None, None), |
544 | 548 |
], None, None, "Write ssconf files"), |
545 | 549 |
]), |
Also available in: Unified diff