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