Package ganeti :: Module _generated_rpc
[hide private]
[frames] | no frames]

Source Code for Module ganeti._generated_rpc

   1  # This code is automatically generated at build time. 
   2  # Do not modify manually. 
   3   
   4  """Automatically generated RPC client wrappers. 
   5   
   6  """ 
   7   
   8  from ganeti import rpc_defs 
   9   
  10  # Definitions from 'lib/rpc_defs.py' 
  11   
12 -class RpcClientDnsOnly(object):
13 # E1101: Non-existent members 14 # R0904: Too many public methods 15 # pylint: disable=E1101,R0904 16 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly'] 17
18 - def call_version(self, node_list, _def=_CALLS['version']):
19 """Wrapper for RPC call 'version' 20 21 Query node version 22 23 @note: This is a multi-node call with a timeout of 1m 0s 24 @type node_list: list of string 25 @param node_list: List of node names 26 27 """ 28 return ( self._Call(_def, node_list, []))
29 30
31 -class RpcClientConfig(object):
32 # E1101: Non-existent members 33 # R0904: Too many public methods 34 # pylint: disable=E1101,R0904 35 _CALLS = rpc_defs.CALLS['RpcClientConfig'] 36
37 - def call_write_ssconf_files(self, node_list, values, 38 _def=_CALLS['write_ssconf_files']):
39 """Wrapper for RPC call 'write_ssconf_files' 40 41 Write ssconf files 42 43 @note: This is a multi-node call with a timeout of 15m 0s 44 @type node_list: list of string 45 @param node_list: List of node names 46 47 """ 48 return ( self._Call(_def, node_list, [values]))
49
50 - def call_upload_file(self, node_list, file_name, 51 _def=_CALLS['upload_file']):
52 """Wrapper for RPC call 'upload_file' 53 54 Upload a file 55 56 @note: This is a multi-node call with a timeout of 15m 0s 57 @type node_list: list of string 58 @param node_list: List of node names 59 60 """ 61 return ( self._Call(_def, node_list, [file_name]))
62 63
64 -class RpcClientDefault(object):
65 # E1101: Non-existent members 66 # R0904: Too many public methods 67 # pylint: disable=E1101,R0904 68 _CALLS = rpc_defs.CALLS['RpcClientDefault'] 69
70 - def call_impexp_cleanup(self, node, name, 71 _def=_CALLS['impexp_cleanup']):
72 """Wrapper for RPC call 'impexp_cleanup' 73 74 Cleans up after an import or export 75 76 @note: This is a single-node call with a timeout of 15m 0s 77 @type node: string 78 @param node: Node name 79 @param name: Import/export name 80 81 """ 82 return ( self._Call(_def, [node], [name])[node])
83
84 - def call_blockdev_pause_resume_sync(self, node, disks, pause, 85 _def=_CALLS['blockdev_pause_resume_sync']):
86 """Wrapper for RPC call 'blockdev_pause_resume_sync' 87 88 Request a pause/resume of given block device 89 90 @note: This is a single-node call with a timeout of 15m 0s 91 @type node: string 92 @param node: Node name 93 94 """ 95 return ( self._Call(_def, [node], [disks, pause])[node])
96
97 - def call_blockdev_close(self, node, instance_name, disks, 98 _def=_CALLS['blockdev_close']):
99 """Wrapper for RPC call 'blockdev_close' 100 101 Closes the given block devices 102 103 @note: This is a single-node call with a timeout of 15m 0s 104 @type node: string 105 @param node: Node name 106 107 """ 108 return ( self._Call(_def, [node], [instance_name, disks])[node])
109
110 - def call_os_get(self, node, name, _def=_CALLS['os_get']):
111 """Wrapper for RPC call 'os_get' 112 113 Returns an OS definition 114 115 @note: This is a single-node call with a timeout of 5m 0s 116 @type node: string 117 @param node: Node name 118 119 """ 120 return ( self._Call(_def, [node], [name])[node])
121
122 - def call_bridges_exist(self, node, bridges_list, 123 _def=_CALLS['bridges_exist']):
124 """Wrapper for RPC call 'bridges_exist' 125 126 Checks if a node has all the bridges given 127 128 @note: This is a single-node call with a timeout of 1m 0s 129 @type node: string 130 @param node: Node name 131 @param bridges_list: Bridges which must be present on remote node 132 133 """ 134 return ( self._Call(_def, [node], [bridges_list])[node])
135
136 - def call_drbd_disconnect_net(self, node_list, nodes_ip, disks, 137 _def=_CALLS['drbd_disconnect_net']):
138 """Wrapper for RPC call 'drbd_disconnect_net' 139 140 Disconnects the network of the given drbd devices 141 142 @note: This is a multi-node call with a timeout of 15m 0s 143 @type node_list: list of string 144 @param node_list: List of node names 145 146 """ 147 return ( self._Call(_def, node_list, [nodes_ip, disks]))
148
149 - def call_file_storage_dir_create(self, node, file_storage_dir, 150 _def=_CALLS['file_storage_dir_create']):
151 """Wrapper for RPC call 'file_storage_dir_create' 152 153 Create the given file storage directory 154 155 @note: This is a single-node call with a timeout of 5m 0s 156 @type node: string 157 @param node: Node name 158 @param file_storage_dir: File storage directory 159 160 """ 161 return ( self._Call(_def, [node], [file_storage_dir])[node])
162
163 - def call_os_diagnose(self, node_list, _def=_CALLS['os_diagnose']):
164 """Wrapper for RPC call 'os_diagnose' 165 166 Request a diagnose of OS definitions 167 168 @note: This is a multi-node call with a timeout of 5m 0s 169 @type node_list: list of string 170 @param node_list: List of node names 171 172 """ 173 return ( self._Call(_def, node_list, []))
174
175 - def call_drbd_attach_net(self, node_list, nodes_ip, disks, 176 instance_name, multimaster, _def=_CALLS['drbd_attach_net']):
177 """Wrapper for RPC call 'drbd_attach_net' 178 179 Connects the given DRBD devices 180 181 @note: This is a multi-node call with a timeout of 15m 0s 182 @type node_list: list of string 183 @param node_list: List of node names 184 185 """ 186 return ( self._Call(_def, node_list, [nodes_ip, disks, instance_name, 187 multimaster]))
188
189 - def call_node_info(self, node_list, vg_names, hv_names, 190 _def=_CALLS['node_info']):
191 """Wrapper for RPC call 'node_info' 192 193 Return node information 194 195 @note: This is a multi-node call with a timeout of 1m 0s 196 @type node_list: list of string 197 @param node_list: List of node names 198 @param vg_names: Names of the volume groups to ask for disk space 199 information 200 @param hv_names: Names of the hypervisors to ask for node information 201 202 """ 203 return ( self._Call(_def, node_list, [vg_names, hv_names]))
204
205 - def call_node_powercycle(self, node, hypervisor, 206 _def=_CALLS['node_powercycle']):
207 """Wrapper for RPC call 'node_powercycle' 208 209 Tries to powercycle a node 210 211 @note: This is a single-node call with a timeout of 15m 0s 212 @type node: string 213 @param node: Node name 214 @param hypervisor: Hypervisor type 215 216 """ 217 return ( self._Call(_def, [node], [hypervisor])[node])
218
219 - def call_import_start(self, node, opts, instance, component, dest, 220 _def=_CALLS['import_start']):
221 """Wrapper for RPC call 'import_start' 222 223 Starts an import daemon 224 225 @note: This is a single-node call with a timeout of 15m 0s 226 @type node: string 227 @param node: Node name 228 @param dest: Import destination 229 230 """ 231 return ( self._Call(_def, [node], [opts, instance, component, 232 dest])[node])
233
234 - def call_test_delay(self, node_list, duration, 235 _def=_CALLS['test_delay']):
236 """Wrapper for RPC call 'test_delay' 237 238 Sleep for a fixed time on given node(s) 239 240 @note: This is a multi-node call 241 @type node_list: list of string 242 @param node_list: List of node names 243 244 """ 245 return ( self._Call(_def, node_list, [duration]))
246
247 - def call_instance_run_rename(self, node, instance, old_name, debug, 248 _def=_CALLS['instance_run_rename']):
249 """Wrapper for RPC call 'instance_run_rename' 250 251 Run the OS rename script for an instance 252 253 @note: This is a single-node call with a timeout of 1h 0m 0s 254 @type node: string 255 @param node: Node name 256 @param instance: Instance object 257 258 """ 259 return ( self._Call(_def, [node], [instance, old_name, debug])[node])
260
261 - def call_blockdev_shutdown(self, node, disk, 262 _def=_CALLS['blockdev_shutdown']):
263 """Wrapper for RPC call 'blockdev_shutdown' 264 265 Request shutdown of a given block device 266 267 @note: This is a single-node call with a timeout of 15m 0s 268 @type node: string 269 @param node: Node name 270 271 """ 272 return ( self._Call(_def, [node], [disk])[node])
273
274 - def call_export_list(self, node_list, _def=_CALLS['export_list']):
275 """Wrapper for RPC call 'export_list' 276 277 Gets the stored exports list 278 279 @note: This is a multi-node call with a timeout of 5m 0s 280 @type node_list: list of string 281 @param node_list: List of node names 282 283 """ 284 return ( self._Call(_def, node_list, []))
285
286 - def call_instance_migrate(self, node, instance, target, live, 287 _def=_CALLS['instance_migrate']):
288 """Wrapper for RPC call 'instance_migrate' 289 290 Migrate an instance 291 292 @note: This is a single-node call with a timeout of 1h 0m 0s 293 @type node: string 294 @param node: Node name 295 @param instance: Instance object 296 @param target: Target node name 297 @param live: Whether the migration should be done live or not 298 299 """ 300 return ( self._Call(_def, [node], [instance, target, live])[node])
301
302 - def call_x509_cert_create(self, node, validity, 303 _def=_CALLS['x509_cert_create']):
304 """Wrapper for RPC call 'x509_cert_create' 305 306 Creates a new X509 certificate for SSL/TLS 307 308 @note: This is a single-node call with a timeout of 15m 0s 309 @type node: string 310 @param node: Node name 311 @param validity: Validity in seconds 312 313 """ 314 return ( self._Call(_def, [node], [validity])[node])
315
316 - def call_instance_reboot(self, node, inst, reboot_type, 317 shutdown_timeout, _def=_CALLS['instance_reboot']):
318 """Wrapper for RPC call 'instance_reboot' 319 320 Returns the list of running instances on the given nodes 321 322 @note: This is a single-node call with a timeout of 15m 0s 323 @type node: string 324 @param node: Node name 325 @param inst: Instance object 326 327 """ 328 return ( self._Call(_def, [node], [inst, reboot_type, 329 shutdown_timeout])[node])
330
331 - def call_export_remove(self, node, export, 332 _def=_CALLS['export_remove']):
333 """Wrapper for RPC call 'export_remove' 334 335 Requests removal of a given export 336 337 @note: This is a single-node call with a timeout of 5m 0s 338 @type node: string 339 @param node: Node name 340 341 """ 342 return ( self._Call(_def, [node], [export])[node])
343
344 - def call_blockdev_getmirrorstatus(self, node, disks, 345 _def=_CALLS['blockdev_getmirrorstatus']):
346 """Wrapper for RPC call 'blockdev_getmirrorstatus' 347 348 Request status of a (mirroring) device 349 350 @note: This is a single-node call with a timeout of 15m 0s 351 @type node: string 352 @param node: Node name 353 354 """ 355 return ( self._Call(_def, [node], [disks])[node])
356
357 - def call_instance_finalize_migration_src(self, node, instance, 358 success, live, _def=_CALLS['instance_finalize_migration_src']):
359 """Wrapper for RPC call 'instance_finalize_migration_src' 360 361 Finalize the instance migration on the source node 362 363 @note: This is a single-node call with a timeout of 1h 0m 0s 364 @type node: string 365 @param node: Node name 366 @param instance: Instance object 367 @param success: Whether the migration succeeded or not 368 @param live: Whether the user requested a live migration or not 369 370 """ 371 return ( self._Call(_def, [node], [instance, success, live])[node])
372
373 - def call_blockdev_getsize(self, node, disks, 374 _def=_CALLS['blockdev_getsize']):
375 """Wrapper for RPC call 'blockdev_getsize' 376 377 Returns the size of the given disks 378 379 @note: This is a single-node call with a timeout of 15m 0s 380 @type node: string 381 @param node: Node name 382 383 """ 384 return ( self._Call(_def, [node], [disks])[node])
385
386 - def call_instance_list(self, node_list, hypervisor_list, 387 _def=_CALLS['instance_list']):
388 """Wrapper for RPC call 'instance_list' 389 390 Returns the list of running instances on the given nodes 391 392 @note: This is a multi-node call with a timeout of 1m 0s 393 @type node_list: list of string 394 @param node_list: List of node names 395 @param hypervisor_list: Hypervisors to query for instances 396 397 """ 398 return ( self._Call(_def, node_list, [hypervisor_list]))
399
400 - def call_iallocator_runner(self, node, name, idata, 401 _def=_CALLS['iallocator_runner']):
402 """Wrapper for RPC call 'iallocator_runner' 403 404 Call an iallocator on a remote node 405 406 @note: This is a single-node call with a timeout of 15m 0s 407 @type node: string 408 @param node: Node name 409 @param name: Iallocator name 410 @param idata: JSON-encoded input string 411 412 """ 413 return ( self._Call(_def, [node], [name, idata])[node])
414
415 - def call_blockdev_assemble(self, node, disk, owner, on_primary, idx, 416 _def=_CALLS['blockdev_assemble']):
417 """Wrapper for RPC call 'blockdev_assemble' 418 419 Request assembling of a given block device 420 421 @note: This is a single-node call with a timeout of 15m 0s 422 @type node: string 423 @param node: Node name 424 425 """ 426 return ( self._Call(_def, [node], [disk, owner, on_primary, 427 idx])[node])
428
429 - def call_storage_modify(self, node, su_name, su_args, name, changes, 430 _def=_CALLS['storage_modify']):
431 """Wrapper for RPC call 'storage_modify' 432 433 Modify a storage unit 434 435 @note: This is a single-node call with a timeout of 15m 0s 436 @type node: string 437 @param node: Node name 438 439 """ 440 return ( self._Call(_def, [node], [su_name, su_args, name, 441 changes])[node])
442
443 - def call_export_info(self, node, path, _def=_CALLS['export_info']):
444 """Wrapper for RPC call 'export_info' 445 446 Queries the export information in a given path 447 448 @note: This is a single-node call with a timeout of 5m 0s 449 @type node: string 450 @param node: Node name 451 452 """ 453 return ( self._Call(_def, [node], [path])[node])
454
455 - def call_export_start(self, node, opts, host, port, instance, 456 component, source, _def=_CALLS['export_start']):
457 """Wrapper for RPC call 'export_start' 458 459 Starts an export daemon 460 461 @note: This is a single-node call with a timeout of 15m 0s 462 @type node: string 463 @param node: Node name 464 @param source: Export source 465 466 """ 467 return ( self._Call(_def, [node], [opts, host, port, instance, 468 component, source])[node])
469
470 - def call_hooks_runner(self, node_list, hpath, phase, env, 471 _def=_CALLS['hooks_runner']):
472 """Wrapper for RPC call 'hooks_runner' 473 474 Call the hooks runner 475 476 @note: This is a multi-node call with a timeout of 15m 0s 477 @type node_list: list of string 478 @param node_list: List of node names 479 480 """ 481 return ( self._Call(_def, node_list, [hpath, phase, env]))
482
483 - def call_instance_migratable(self, node, instance, 484 _def=_CALLS['instance_migratable']):
485 """Wrapper for RPC call 'instance_migratable' 486 487 Checks whether the given instance can be migrated 488 489 @note: This is a single-node call with a timeout of 15m 0s 490 @type node: string 491 @param node: Node name 492 @param instance: Instance object 493 494 """ 495 return ( self._Call(_def, [node], [instance])[node])
496
497 - def call_storage_execute(self, node, su_name, su_args, name, op, 498 _def=_CALLS['storage_execute']):
499 """Wrapper for RPC call 'storage_execute' 500 501 Executes an operation on a storage unit 502 503 @note: This is a single-node call with a timeout of 15m 0s 504 @type node: string 505 @param node: Node name 506 507 """ 508 return ( self._Call(_def, [node], [su_name, su_args, name, op])[node])
509
510 - def call_node_volumes(self, node_list, _def=_CALLS['node_volumes']):
511 """Wrapper for RPC call 'node_volumes' 512 513 Gets all volumes on node(s) 514 515 @note: This is a multi-node call with a timeout of 5m 0s 516 @type node_list: list of string 517 @param node_list: List of node names 518 519 """ 520 return ( self._Call(_def, node_list, []))
521
522 - def call_bdev_sizes(self, node_list, devices, 523 _def=_CALLS['bdev_sizes']):
524 """Wrapper for RPC call 'bdev_sizes' 525 526 Gets the sizes of requested block devices present on a node 527 528 @note: This is a multi-node call with a timeout of 1m 0s 529 @type node_list: list of string 530 @param node_list: List of node names 531 532 """ 533 return ( self._Call(_def, node_list, [devices]))
534
535 - def call_vg_list(self, node_list, _def=_CALLS['vg_list']):
536 """Wrapper for RPC call 'vg_list' 537 538 Gets the volume group list 539 540 @note: This is a multi-node call with a timeout of 1m 0s 541 @type node_list: list of string 542 @param node_list: List of node names 543 544 """ 545 return ( self._Call(_def, node_list, []))
546
547 - def call_blockdev_remove(self, node, bdev, 548 _def=_CALLS['blockdev_remove']):
549 """Wrapper for RPC call 'blockdev_remove' 550 551 Request removal of a given block device 552 553 @note: This is a single-node call with a timeout of 15m 0s 554 @type node: string 555 @param node: Node name 556 557 """ 558 return ( self._Call(_def, [node], [bdev])[node])
559
560 - def call_blockdev_find(self, node, disk, 561 _def=_CALLS['blockdev_find']):
562 """Wrapper for RPC call 'blockdev_find' 563 564 Request identification of a given block device 565 566 @note: This is a single-node call with a timeout of 15m 0s 567 @type node: string 568 @param node: Node name 569 570 """ 571 return ( self._Call(_def, [node], [disk])[node])
572
573 - def call_blockdev_addchildren(self, node, bdev, ndevs, 574 _def=_CALLS['blockdev_addchildren']):
575 """Wrapper for RPC call 'blockdev_addchildren' 576 577 Request adding a list of children to a (mirroring) device 578 579 @note: This is a single-node call with a timeout of 15m 0s 580 @type node: string 581 @param node: Node name 582 583 """ 584 return ( self._Call(_def, [node], [bdev, ndevs])[node])
585
586 - def call_instance_get_migration_status(self, node, instance, 587 _def=_CALLS['instance_get_migration_status']):
588 """Wrapper for RPC call 'instance_get_migration_status' 589 590 Report migration status 591 592 @note: This is a single-node call with a timeout of 1h 0m 0s 593 @type node: string 594 @param node: Node name 595 @param instance: Instance object 596 597 """ 598 return ( self._Call(_def, [node], [instance])[node])
599
600 - def call_all_instances_info(self, node_list, hypervisor_list, 601 _def=_CALLS['all_instances_info']):
602 """Wrapper for RPC call 'all_instances_info' 603 604 Returns information about all instances on the given nodes 605 606 @note: This is a multi-node call with a timeout of 1m 0s 607 @type node_list: list of string 608 @param node_list: List of node names 609 @param hypervisor_list: Hypervisors to query for instances 610 611 """ 612 return ( self._Call(_def, node_list, [hypervisor_list]))
613
614 - def call_drbd_wait_sync(self, node_list, nodes_ip, disks, 615 _def=_CALLS['drbd_wait_sync']):
616 """Wrapper for RPC call 'drbd_wait_sync' 617 618 Waits for the synchronization of drbd devices is complete 619 620 @note: This is a multi-node call with a timeout of 1h 0m 0s 621 @type node_list: list of string 622 @param node_list: List of node names 623 624 """ 625 return ( self._Call(_def, node_list, [nodes_ip, disks]))
626
627 - def call_accept_instance(self, node, instance, info, target, 628 _def=_CALLS['accept_instance']):
629 """Wrapper for RPC call 'accept_instance' 630 631 Prepare a node to accept an instance 632 633 @note: This is a single-node call with a timeout of 15m 0s 634 @type node: string 635 @param node: Node name 636 @param instance: Instance object 637 @param info: Result for the call_migration_info call 638 @param target: Target hostname (usually an IP address) 639 640 """ 641 return ( self._Call(_def, [node], [instance, info, target])[node])
642
643 - def call_blockdev_getmirrorstatus_multi(self, node_list, node_disks, 644 _def=_CALLS['blockdev_getmirrorstatus_multi']):
645 """Wrapper for RPC call 'blockdev_getmirrorstatus_multi' 646 647 Request status of (mirroring) devices from multiple nodes 648 649 @note: This is a multi-node call with a timeout of 15m 0s 650 @type node_list: list of string 651 @param node_list: List of node names 652 653 """ 654 return ( self._Call(_def, node_list, [node_disks]))
655
656 - def call_instance_os_add(self, node, instance_osp, reinstall, debug, 657 _def=_CALLS['instance_os_add']):
658 """Wrapper for RPC call 'instance_os_add' 659 660 Starts an instance 661 662 @note: This is a single-node call with a timeout of 1d 0h 0m 0s 663 @type node: string 664 @param node: Node name 665 666 """ 667 return ( self._Call(_def, [node], [instance_osp, reinstall, 668 debug])[node])
669
670 - def call_blockdev_rename(self, node, devlist, 671 _def=_CALLS['blockdev_rename']):
672 """Wrapper for RPC call 'blockdev_rename' 673 674 Request rename of the given block devices 675 676 @note: This is a single-node call with a timeout of 15m 0s 677 @type node: string 678 @param node: Node name 679 680 """ 681 return ( self._Call(_def, [node], [devlist])[node])
682
683 - def call_etc_hosts_modify(self, node, mode, name, ip, 684 _def=_CALLS['etc_hosts_modify']):
685 """Wrapper for RPC call 'etc_hosts_modify' 686 687 Modify hosts file with name 688 689 @note: This is a single-node call with a timeout of 15m 0s 690 @type node: string 691 @param node: Node name 692 @param mode: Mode to operate; currently L{constants.ETC_HOSTS_ADD} or 693 L{constants.ETC_HOSTS_REMOVE} 694 @param name: Hostname to be modified 695 @param ip: IP address (L{constants.ETC_HOSTS_ADD} only) 696 697 """ 698 return ( self._Call(_def, [node], [mode, name, ip])[node])
699
700 - def call_os_validate(self, node_list, required, name, checks, params, 701 _def=_CALLS['os_validate']):
702 """Wrapper for RPC call 'os_validate' 703 704 Run a validation routine for a given OS 705 706 @note: This is a multi-node call with a timeout of 5m 0s 707 @type node_list: list of string 708 @param node_list: List of node names 709 710 """ 711 return ( self._Call(_def, node_list, [required, name, checks, 712 params]))
713
714 - def call_run_oob(self, node, oob_program, command, remote_node, 715 timeout, _def=_CALLS['run_oob']):
716 """Wrapper for RPC call 'run_oob' 717 718 Runs out-of-band command 719 720 @note: This is a single-node call with a timeout of 15m 0s 721 @type node: string 722 @param node: Node name 723 724 """ 725 return ( self._Call(_def, [node], [oob_program, command, remote_node, 726 timeout])[node])
727
728 - def call_blockdev_grow(self, node, cf_bdev, amount, dryrun, 729 _def=_CALLS['blockdev_grow']):
730 """Wrapper for RPC call 'blockdev_grow' 731 732 Request a snapshot of the given block device 733 734 @note: This is a single-node call with a timeout of 15m 0s 735 @type node: string 736 @param node: Node name 737 738 """ 739 return ( self._Call(_def, [node], [cf_bdev, amount, dryrun])[node])
740
741 - def call_storage_list(self, node_list, su_name, su_args, name, fields, 742 _def=_CALLS['storage_list']):
743 """Wrapper for RPC call 'storage_list' 744 745 Get list of storage units 746 747 @note: This is a multi-node call with a timeout of 15m 0s 748 @type node_list: list of string 749 @param node_list: List of node names 750 751 """ 752 return ( self._Call(_def, node_list, [su_name, su_args, name, 753 fields]))
754
755 - def call_x509_cert_remove(self, node, name, 756 _def=_CALLS['x509_cert_remove']):
757 """Wrapper for RPC call 'x509_cert_remove' 758 759 Removes a X509 certificate 760 761 @note: This is a single-node call with a timeout of 15m 0s 762 @type node: string 763 @param node: Node name 764 @param name: Certificate name 765 766 """ 767 return ( self._Call(_def, [node], [name])[node])
768
769 - def call_node_verify(self, node_list, checkdict, cluster_name, 770 _def=_CALLS['node_verify']):
771 """Wrapper for RPC call 'node_verify' 772 773 Request verification of given parameters 774 775 @note: This is a multi-node call with a timeout of 15m 0s 776 @type node_list: list of string 777 @param node_list: List of node names 778 779 """ 780 return ( self._Call(_def, node_list, [checkdict, cluster_name]))
781
782 - def call_file_storage_dir_remove(self, node, file_storage_dir, 783 _def=_CALLS['file_storage_dir_remove']):
784 """Wrapper for RPC call 'file_storage_dir_remove' 785 786 Remove the given file storage directory 787 788 @note: This is a single-node call with a timeout of 5m 0s 789 @type node: string 790 @param node: Node name 791 @param file_storage_dir: File storage directory 792 793 """ 794 return ( self._Call(_def, [node], [file_storage_dir])[node])
795
796 - def call_node_demote_from_mc(self, node, 797 _def=_CALLS['node_demote_from_mc']):
798 """Wrapper for RPC call 'node_demote_from_mc' 799 800 Demote a node from the master candidate role 801 802 @note: This is a single-node call with a timeout of 5m 0s 803 @type node: string 804 @param node: Node name 805 806 """ 807 return ( self._Call(_def, [node], [])[node])
808
809 - def call_impexp_abort(self, node, name, _def=_CALLS['impexp_abort']):
810 """Wrapper for RPC call 'impexp_abort' 811 812 Aborts an import or export 813 814 @note: This is a single-node call with a timeout of 15m 0s 815 @type node: string 816 @param node: Node name 817 @param name: Import/export name 818 819 """ 820 return ( self._Call(_def, [node], [name])[node])
821
822 - def call_drbd_helper(self, node_list, _def=_CALLS['drbd_helper']):
823 """Wrapper for RPC call 'drbd_helper' 824 825 Gets DRBD helper 826 827 @note: This is a multi-node call with a timeout of 1m 0s 828 @type node_list: list of string 829 @param node_list: List of node names 830 831 """ 832 return ( self._Call(_def, node_list, []))
833
834 - def call_blockdev_wipe(self, node, bdev, offset, size, 835 _def=_CALLS['blockdev_wipe']):
836 """Wrapper for RPC call 'blockdev_wipe' 837 838 Request wipe at given offset with given size of a block device 839 840 @note: This is a single-node call with a timeout of 1h 0m 0s 841 @type node: string 842 @param node: Node name 843 844 """ 845 return ( self._Call(_def, [node], [bdev, offset, size])[node])
846
847 - def call_blockdev_create(self, node, bdev, size, owner, on_primary, 848 info, _def=_CALLS['blockdev_create']):
849 """Wrapper for RPC call 'blockdev_create' 850 851 Request creation of a given block device 852 853 @note: This is a single-node call with a timeout of 15m 0s 854 @type node: string 855 @param node: Node name 856 857 """ 858 return ( self._Call(_def, [node], [bdev, size, owner, on_primary, 859 info])[node])
860
861 - def call_impexp_status(self, node, names, 862 _def=_CALLS['impexp_status']):
863 """Wrapper for RPC call 'impexp_status' 864 865 Gets the status of an import or export 866 867 @note: This is a single-node call with a timeout of 5m 0s 868 @type node: string 869 @param node: Node name 870 @param names: Import/export names 871 872 """ 873 return ( self._Call(_def, [node], [names])[node])
874
875 - def call_instance_balloon_memory(self, node, instance, memory, 876 _def=_CALLS['instance_balloon_memory']):
877 """Wrapper for RPC call 'instance_balloon_memory' 878 879 Modify the amount of an instance's runtime memory 880 881 @note: This is a single-node call with a timeout of 15m 0s 882 @type node: string 883 @param node: Node name 884 @param instance: Instance object 885 886 """ 887 return ( self._Call(_def, [node], [instance, memory])[node])
888
889 - def call_migration_info(self, node, instance, 890 _def=_CALLS['migration_info']):
891 """Wrapper for RPC call 'migration_info' 892 893 Gather the information necessary to prepare an instance migration 894 895 @note: This is a single-node call with a timeout of 15m 0s 896 @type node: string 897 @param node: Node name 898 @param instance: Instance object 899 900 """ 901 return ( self._Call(_def, [node], [instance])[node])
902
903 - def call_blockdev_export(self, node, cf_bdev, dest_node, dest_path, 904 cluster_name, _def=_CALLS['blockdev_export']):
905 """Wrapper for RPC call 'blockdev_export' 906 907 Export a given disk to another node 908 909 @note: This is a single-node call with a timeout of 1d 0h 0m 0s 910 @type node: string 911 @param node: Node name 912 913 """ 914 return ( self._Call(_def, [node], [cf_bdev, dest_node, dest_path, 915 cluster_name])[node])
916
917 - def call_hypervisor_validate_params(self, node_list, hvname, hvfull, 918 _def=_CALLS['hypervisor_validate_params']):
919 """Wrapper for RPC call 'hypervisor_validate_params' 920 921 Validate hypervisor params 922 923 @note: This is a multi-node call with a timeout of 15m 0s 924 @type node_list: list of string 925 @param node_list: List of node names 926 @param hvname: Hypervisor name 927 @param hvfull: Parameters to be validated 928 929 """ 930 return ( self._Call(_def, node_list, [hvname, hvfull]))
931
932 - def call_finalize_export(self, node, instance, snap_disks, 933 _def=_CALLS['finalize_export']):
934 """Wrapper for RPC call 'finalize_export' 935 936 Request the completion of an export operation 937 938 @note: This is a single-node call with a timeout of 15m 0s 939 @type node: string 940 @param node: Node name 941 942 """ 943 return ( self._Call(_def, [node], [instance, snap_disks])[node])
944
945 - def call_file_storage_dir_rename(self, node, old_file_storage_dir, 946 new_file_storage_dir, _def=_CALLS['file_storage_dir_rename']):
947 """Wrapper for RPC call 'file_storage_dir_rename' 948 949 Rename file storage directory 950 951 @note: This is a single-node call with a timeout of 5m 0s 952 @type node: string 953 @param node: Node name 954 @param old_file_storage_dir: Old name 955 @param new_file_storage_dir: New name 956 957 """ 958 return ( self._Call(_def, [node], [old_file_storage_dir, 959 new_file_storage_dir])[node])
960
961 - def call_instance_shutdown(self, node, instance, timeout, 962 _def=_CALLS['instance_shutdown']):
963 """Wrapper for RPC call 'instance_shutdown' 964 965 Stops an instance 966 967 @note: This is a single-node call with a timeout of 15m 0s 968 @type node: string 969 @param node: Node name 970 @param instance: Instance object 971 972 """ 973 return ( self._Call(_def, [node], [instance, timeout])[node])
974
975 - def call_instance_finalize_migration_dst(self, node, instance, info, 976 success, _def=_CALLS['instance_finalize_migration_dst']):
977 """Wrapper for RPC call 'instance_finalize_migration_dst' 978 979 Finalize any target-node migration specific operation 980 981 @note: This is a single-node call with a timeout of 15m 0s 982 @type node: string 983 @param node: Node name 984 @param instance: Instance object 985 @param info: Result for the call_migration_info call 986 @param success: Whether the migration was a success or failure 987 988 """ 989 return ( self._Call(_def, [node], [instance, info, success])[node])
990
991 - def call_blockdev_snapshot(self, node, cf_bdev, 992 _def=_CALLS['blockdev_snapshot']):
993 """Wrapper for RPC call 'blockdev_snapshot' 994 995 Export a given disk to another node 996 997 @note: This is a single-node call with a timeout of 15m 0s 998 @type node: string 999 @param node: Node name 1000 1001 """ 1002 return ( self._Call(_def, [node], [cf_bdev])[node])
1003
1004 - def call_lv_list(self, node_list, vg_name, _def=_CALLS['lv_list']):
1005 """Wrapper for RPC call 'lv_list' 1006 1007 Gets the logical volumes present in a given volume group 1008 1009 @note: This is a multi-node call with a timeout of 1m 0s 1010 @type node_list: list of string 1011 @param node_list: List of node names 1012 1013 """ 1014 return ( self._Call(_def, node_list, [vg_name]))
1015
1016 - def call_blockdev_removechildren(self, node, bdev, ndevs, 1017 _def=_CALLS['blockdev_removechildren']):
1018 """Wrapper for RPC call 'blockdev_removechildren' 1019 1020 Request removing a list of children from a (mirroring) device 1021 1022 @note: This is a single-node call with a timeout of 15m 0s 1023 @type node: string 1024 @param node: Node name 1025 1026 """ 1027 return ( self._Call(_def, [node], [bdev, ndevs])[node])
1028
1029 - def call_instance_info(self, node, instance, hname, 1030 _def=_CALLS['instance_info']):
1031 """Wrapper for RPC call 'instance_info' 1032 1033 Returns information about a single instance 1034 1035 @note: This is a single-node call with a timeout of 1m 0s 1036 @type node: string 1037 @param node: Node name 1038 @param instance: Instance name 1039 @param hname: Hypervisor type 1040 1041 """ 1042 return ( self._Call(_def, [node], [instance, hname])[node])
1043
1044 - def call_instance_start(self, node, instance_hvp_bep, startup_paused, 1045 _def=_CALLS['instance_start']):
1046 """Wrapper for RPC call 'instance_start' 1047 1048 Starts an instance 1049 1050 @note: This is a single-node call with a timeout of 15m 0s 1051 @type node: string 1052 @param node: Node name 1053 1054 """ 1055 return ( self._Call(_def, [node], [instance_hvp_bep, 1056 startup_paused])[node])
1057
1058 - def call_node_has_ip_address(self, node, address, 1059 _def=_CALLS['node_has_ip_address']):
1060 """Wrapper for RPC call 'node_has_ip_address' 1061 1062 Checks if a node has the given IP address 1063 1064 @note: This is a single-node call with a timeout of 5m 0s 1065 @type node: string 1066 @param node: Node name 1067 @param address: IP address 1068 1069 """ 1070 return ( self._Call(_def, [node], [address])[node])
1071 1072
1073 -class RpcClientBootstrap(object):
1074 # E1101: Non-existent members 1075 # R0904: Too many public methods 1076 # pylint: disable=E1101,R0904 1077 _CALLS = rpc_defs.CALLS['RpcClientBootstrap'] 1078
1079 - def call_node_stop_master(self, node, 1080 _def=_CALLS['node_stop_master']):
1081 """Wrapper for RPC call 'node_stop_master' 1082 1083 Deactivates master IP and stops master daemons on a node 1084 1085 @note: This is a single-node call with a timeout of 5m 0s 1086 @type node: string 1087 @param node: Node name 1088 1089 """ 1090 return ( self._Call(_def, [node], [])[node])
1091
1092 - def call_node_leave_cluster(self, node, modify_ssh_setup, 1093 _def=_CALLS['node_leave_cluster']):
1094 """Wrapper for RPC call 'node_leave_cluster' 1095 1096 Requests a node to clean the cluster information it has 1097 1098 @note: This is a single-node call with a timeout of 15m 0s 1099 @type node: string 1100 @param node: Node name 1101 1102 """ 1103 return ( self._Call(_def, [node], [modify_ssh_setup])[node])
1104
1105 - def call_node_change_master_netmask(self, node, old_netmask, netmask, 1106 master_ip, master_netdev, 1107 _def=_CALLS['node_change_master_netmask']):
1108 """Wrapper for RPC call 'node_change_master_netmask' 1109 1110 Change master IP netmask 1111 1112 @note: This is a single-node call with a timeout of 5m 0s 1113 @type node: string 1114 @param node: Node name 1115 @param old_netmask: The old value of the netmask 1116 @param netmask: The new value of the netmask 1117 @param master_ip: The master IP 1118 @param master_netdev: The master network device 1119 1120 """ 1121 return ( self._Call(_def, [node], [old_netmask, netmask, master_ip, 1122 master_netdev])[node])
1123
1124 - def call_node_activate_master_ip(self, node, master_params, 1125 use_external_mip_script, _def=_CALLS['node_activate_master_ip']):
1126 """Wrapper for RPC call 'node_activate_master_ip' 1127 1128 Activates master IP on a node 1129 1130 @note: This is a single-node call with a timeout of 5m 0s 1131 @type node: string 1132 @param node: Node name 1133 @param master_params: Network parameters of the master 1134 @param use_external_mip_script: Whether to use the user-provided 1135 master IP address setup script 1136 1137 """ 1138 return ( self._Call(_def, [node], [master_params, 1139 use_external_mip_script])[node])
1140
1141 - def call_node_start_master_daemons(self, node, no_voting, 1142 _def=_CALLS['node_start_master_daemons']):
1143 """Wrapper for RPC call 'node_start_master_daemons' 1144 1145 Starts master daemons on a node 1146 1147 @note: This is a single-node call with a timeout of 5m 0s 1148 @type node: string 1149 @param node: Node name 1150 1151 """ 1152 return ( self._Call(_def, [node], [no_voting])[node])
1153
1154 - def call_master_info(self, node_list, _def=_CALLS['master_info']):
1155 """Wrapper for RPC call 'master_info' 1156 1157 Query master info 1158 1159 @note: This is a multi-node call with a timeout of 1m 0s 1160 @type node_list: list of string 1161 @param node_list: List of node names 1162 1163 """ 1164 return ( self._Call(_def, node_list, []))
1165
1166 - def call_node_deactivate_master_ip(self, node, master_params, 1167 use_external_mip_script, _def=_CALLS['node_deactivate_master_ip']):
1168 """Wrapper for RPC call 'node_deactivate_master_ip' 1169 1170 Deactivates master IP on a node 1171 1172 @note: This is a single-node call with a timeout of 5m 0s 1173 @type node: string 1174 @param node: Node name 1175 @param master_params: Network parameters of the master 1176 @param use_external_mip_script: Whether to use the user-provided 1177 master IP address setup script 1178 1179 """ 1180 return ( self._Call(_def, [node], [master_params, 1181 use_external_mip_script])[node])
1182 1183
1184 -class RpcClientJobQueue(object):
1185 # E1101: Non-existent members 1186 # R0904: Too many public methods 1187 # pylint: disable=E1101,R0904 1188 _CALLS = rpc_defs.CALLS['RpcClientJobQueue'] 1189
1190 - def call_jobqueue_purge(self, node, _def=_CALLS['jobqueue_purge']):
1191 """Wrapper for RPC call 'jobqueue_purge' 1192 1193 Purge job queue 1194 1195 @note: This is a single-node call with a timeout of 15m 0s 1196 @type node: string 1197 @param node: Node name 1198 1199 """ 1200 return ( self._Call(_def, [node], [])[node])
1201
1202 - def call_jobqueue_rename(self, node_list, rename, 1203 _def=_CALLS['jobqueue_rename']):
1204 """Wrapper for RPC call 'jobqueue_rename' 1205 1206 Rename job queue file 1207 1208 @note: This is a multi-node call with a timeout of 1m 0s 1209 @type node_list: list of string 1210 @param node_list: List of node names 1211 1212 """ 1213 return ( self._Call(_def, node_list, [rename]))
1214
1215 - def call_jobqueue_update(self, node_list, file_name, content, 1216 _def=_CALLS['jobqueue_update']):
1217 """Wrapper for RPC call 'jobqueue_update' 1218 1219 Update job queue file 1220 1221 @note: This is a multi-node call with a timeout of 1m 0s 1222 @type node_list: list of string 1223 @param node_list: List of node names 1224 1225 """ 1226 return ( self._Call(_def, node_list, [file_name, content]))
1227