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, _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 904 """ 905 return (self._Call(_def, [node], [inst, reboot_type, 906 shutdown_timeout])[node])
907
908 - def call_instance_run_rename(self, node, instance, old_name, debug, 909 _def=_CALLS['instance_run_rename']):
910 """Wrapper for RPC call 'instance_run_rename' 911 912 Run the OS rename script for an instance 913 914 @note: This is a single-node call with a timeout of 1h 0m 0s 915 @type node: string 916 @param node: Node name 917 @param instance: Instance object 918 919 """ 920 return (self._Call(_def, [node], [instance, old_name, debug])[node])
921
922 - def call_instance_shutdown(self, node, instance, timeout, 923 _def=_CALLS['instance_shutdown']):
924 """Wrapper for RPC call 'instance_shutdown' 925 926 Stops an instance 927 928 @note: This is a single-node call with a timeout of 15m 0s 929 @type node: string 930 @param node: Node name 931 @param instance: Instance object 932 933 """ 934 return (self._Call(_def, [node], [instance, timeout])[node])
935
936 - def call_instance_start(self, node, instance_hvp_bep, startup_paused, 937 _def=_CALLS['instance_start']):
938 """Wrapper for RPC call 'instance_start' 939 940 Starts an instance 941 942 @note: This is a single-node call with a timeout of 15m 0s 943 @type node: string 944 @param node: Node name 945 946 """ 947 return (self._Call(_def, [node], [instance_hvp_bep, 948 startup_paused])[node])
949
950 - def call_lv_list(self, node_list, vg_name, _def=_CALLS['lv_list']):
951 """Wrapper for RPC call 'lv_list' 952 953 Gets the logical volumes present in a given volume group 954 955 @note: This is a multi-node call with a timeout of 1m 0s 956 @type node_list: list of string 957 @param node_list: List of node names 958 959 """ 960 return (self._Call(_def, node_list, [vg_name]))
961
962 - def call_migration_info(self, node, instance, 963 _def=_CALLS['migration_info']):
964 """Wrapper for RPC call 'migration_info' 965 966 Gather the information necessary to prepare an instance migration 967 968 @note: This is a single-node call with a timeout of 15m 0s 969 @type node: string 970 @param node: Node name 971 @param instance: Instance object 972 973 """ 974 return (self._Call(_def, [node], [instance])[node])
975
976 - def call_node_demote_from_mc(self, node, 977 _def=_CALLS['node_demote_from_mc']):
978 """Wrapper for RPC call 'node_demote_from_mc' 979 980 Demote a node from the master candidate role 981 982 @note: This is a single-node call with a timeout of 5m 0s 983 @type node: string 984 @param node: Node name 985 986 """ 987 return (self._Call(_def, [node], [])[node])
988
989 - def call_node_has_ip_address(self, node, address, 990 _def=_CALLS['node_has_ip_address']):
991 """Wrapper for RPC call 'node_has_ip_address' 992 993 Checks if a node has the given IP address 994 995 @note: This is a single-node call with a timeout of 5m 0s 996 @type node: string 997 @param node: Node name 998 @param address: IP address 999 1000 """ 1001 return (self._Call(_def, [node], [address])[node])
1002
1003 - def call_node_info(self, node_list, vg_names, hv_names, 1004 exclusive_storage, _def=_CALLS['node_info']):
1005 """Wrapper for RPC call 'node_info' 1006 1007 Return node information 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 @param vg_names: Names of the volume groups to ask for disk space 1013 information 1014 @param hv_names: Names of the hypervisors to ask for node information 1015 @param exclusive_storage: Whether exclusive storage is enabled 1016 1017 """ 1018 return (self._Call(_def, node_list, [vg_names, hv_names, 1019 exclusive_storage]))
1020
1021 - def call_node_powercycle(self, node, hypervisor, 1022 _def=_CALLS['node_powercycle']):
1023 """Wrapper for RPC call 'node_powercycle' 1024 1025 Tries to powercycle a node 1026 1027 @note: This is a single-node call with a timeout of 15m 0s 1028 @type node: string 1029 @param node: Node name 1030 @param hypervisor: Hypervisor type 1031 1032 """ 1033 return (self._Call(_def, [node], [hypervisor])[node])
1034
1035 - def call_node_verify(self, node_list, checkdict, cluster_name, 1036 _def=_CALLS['node_verify']):
1037 """Wrapper for RPC call 'node_verify' 1038 1039 Request verification of given parameters 1040 1041 @note: This is a multi-node call with a timeout of 15m 0s 1042 @type node_list: list of string 1043 @param node_list: List of node names 1044 1045 """ 1046 return (self._Call(_def, node_list, [checkdict, cluster_name]))
1047
1048 - def call_node_volumes(self, node_list, _def=_CALLS['node_volumes']):
1049 """Wrapper for RPC call 'node_volumes' 1050 1051 Gets all volumes on node(s) 1052 1053 @note: This is a multi-node call with a timeout of 5m 0s 1054 @type node_list: list of string 1055 @param node_list: List of node names 1056 1057 """ 1058 return (self._Call(_def, node_list, []))
1059
1060 - def call_os_diagnose(self, node_list, _def=_CALLS['os_diagnose']):
1061 """Wrapper for RPC call 'os_diagnose' 1062 1063 Request a diagnose of OS definitions 1064 1065 @note: This is a multi-node call with a timeout of 5m 0s 1066 @type node_list: list of string 1067 @param node_list: List of node names 1068 1069 """ 1070 return (self._Call(_def, node_list, []))
1071
1072 - def call_os_get(self, node, name, _def=_CALLS['os_get']):
1073 """Wrapper for RPC call 'os_get' 1074 1075 Returns an OS definition 1076 1077 @note: This is a single-node call with a timeout of 5m 0s 1078 @type node: string 1079 @param node: Node name 1080 1081 """ 1082 return (self._Call(_def, [node], [name])[node])
1083
1084 - def call_os_validate(self, node_list, required, name, checks, params, 1085 _def=_CALLS['os_validate']):
1086 """Wrapper for RPC call 'os_validate' 1087 1088 Run a validation routine for a given OS 1089 1090 @note: This is a multi-node call with a timeout of 5m 0s 1091 @type node_list: list of string 1092 @param node_list: List of node names 1093 1094 """ 1095 return (self._Call(_def, node_list, [required, name, checks, params]))
1096
1097 - def call_restricted_command(self, node_list, cmd, 1098 _def=_CALLS['restricted_command']):
1099 """Wrapper for RPC call 'restricted_command' 1100 1101 Runs restricted command 1102 1103 @note: This is a multi-node call with a timeout of 1h 0m 0s 1104 @type node_list: list of string 1105 @param node_list: List of node names 1106 @param cmd: Command name 1107 1108 """ 1109 return (self._Call(_def, node_list, [cmd]))
1110
1111 - def call_run_oob(self, node, oob_program, command, remote_node, 1112 timeout, _def=_CALLS['run_oob']):
1113 """Wrapper for RPC call 'run_oob' 1114 1115 Runs out-of-band command 1116 1117 @note: This is a single-node call with a timeout of 15m 0s 1118 @type node: string 1119 @param node: Node name 1120 1121 """ 1122 return (self._Call(_def, [node], [oob_program, command, remote_node, 1123 timeout])[node])
1124
1125 - def call_set_watcher_pause(self, node_list, until, 1126 _def=_CALLS['set_watcher_pause']):
1127 """Wrapper for RPC call 'set_watcher_pause' 1128 1129 Set watcher pause end 1130 1131 @note: This is a multi-node call with a timeout of 1m 0s 1132 @type node_list: list of string 1133 @param node_list: List of node names 1134 1135 """ 1136 return (self._Call(_def, node_list, [until]))
1137
1138 - def call_storage_execute(self, node, su_name, su_args, name, op, 1139 _def=_CALLS['storage_execute']):
1140 """Wrapper for RPC call 'storage_execute' 1141 1142 Executes an operation on a storage unit 1143 1144 @note: This is a single-node call with a timeout of 15m 0s 1145 @type node: string 1146 @param node: Node name 1147 1148 """ 1149 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1150
1151 - def call_storage_list(self, node_list, su_name, su_args, name, fields, 1152 _def=_CALLS['storage_list']):
1153 """Wrapper for RPC call 'storage_list' 1154 1155 Get list of storage units 1156 1157 @note: This is a multi-node call with a timeout of 15m 0s 1158 @type node_list: list of string 1159 @param node_list: List of node names 1160 1161 """ 1162 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1163
1164 - def call_storage_modify(self, node, su_name, su_args, name, changes, 1165 _def=_CALLS['storage_modify']):
1166 """Wrapper for RPC call 'storage_modify' 1167 1168 Modify a storage unit 1169 1170 @note: This is a single-node call with a timeout of 15m 0s 1171 @type node: string 1172 @param node: Node name 1173 1174 """ 1175 return (self._Call(_def, [node], [su_name, su_args, name, 1176 changes])[node])
1177
1178 - def call_test_delay(self, node_list, duration, 1179 _def=_CALLS['test_delay']):
1180 """Wrapper for RPC call 'test_delay' 1181 1182 Sleep for a fixed time on given node(s) 1183 1184 @note: This is a multi-node call 1185 @type node_list: list of string 1186 @param node_list: List of node names 1187 1188 """ 1189 return (self._Call(_def, node_list, [duration]))
1190
1191 - def call_vg_list(self, node_list, _def=_CALLS['vg_list']):
1192 """Wrapper for RPC call 'vg_list' 1193 1194 Gets the volume group list 1195 1196 @note: This is a multi-node call with a timeout of 1m 0s 1197 @type node_list: list of string 1198 @param node_list: List of node names 1199 1200 """ 1201 return (self._Call(_def, node_list, []))
1202
1203 - def call_x509_cert_create(self, node, validity, 1204 _def=_CALLS['x509_cert_create']):
1205 """Wrapper for RPC call 'x509_cert_create' 1206 1207 Creates a new X509 certificate for SSL/TLS 1208 1209 @note: This is a single-node call with a timeout of 15m 0s 1210 @type node: string 1211 @param node: Node name 1212 @param validity: Validity in seconds 1213 1214 """ 1215 return (self._Call(_def, [node], [validity])[node])
1216
1217 - def call_x509_cert_remove(self, node, name, 1218 _def=_CALLS['x509_cert_remove']):
1219 """Wrapper for RPC call 'x509_cert_remove' 1220 1221 Removes a X509 certificate 1222 1223 @note: This is a single-node call with a timeout of 15m 0s 1224 @type node: string 1225 @param node: Node name 1226 @param name: Certificate name 1227 1228 """ 1229 return (self._Call(_def, [node], [name])[node])
1230 1231
1232 -class RpcClientDnsOnly(object):
1233 # E1101: Non-existent members 1234 # R0904: Too many public methods 1235 # pylint: disable=E1101,R0904 1236 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly'] 1237
1238 - def call_node_verify_light(self, node_list, checkdict, cluster_name, 1239 _def=_CALLS['node_verify_light']):
1240 """Wrapper for RPC call 'node_verify_light' 1241 1242 Request verification of given parameters 1243 1244 @note: This is a multi-node call with a timeout of 15m 0s 1245 @type node_list: list of string 1246 @param node_list: List of node names 1247 1248 """ 1249 return (self._Call(_def, node_list, [checkdict, cluster_name]))
1250
1251 - def call_version(self, node_list, _def=_CALLS['version']):
1252 """Wrapper for RPC call 'version' 1253 1254 Query node version 1255 1256 @note: This is a multi-node call with a timeout of 1m 0s 1257 @type node_list: list of string 1258 @param node_list: List of node names 1259 1260 """ 1261 return (self._Call(_def, node_list, []))
1262 1263
1264 -class RpcClientJobQueue(object):
1265 # E1101: Non-existent members 1266 # R0904: Too many public methods 1267 # pylint: disable=E1101,R0904 1268 _CALLS = rpc_defs.CALLS['RpcClientJobQueue'] 1269
1270 - def call_jobqueue_purge(self, node, _def=_CALLS['jobqueue_purge']):
1271 """Wrapper for RPC call 'jobqueue_purge' 1272 1273 Purge job queue 1274 1275 @note: This is a single-node call with a timeout of 15m 0s 1276 @type node: string 1277 @param node: Node name 1278 1279 """ 1280 return (self._Call(_def, [node], [])[node])
1281
1282 - def call_jobqueue_rename(self, node_list, rename, 1283 _def=_CALLS['jobqueue_rename']):
1284 """Wrapper for RPC call 'jobqueue_rename' 1285 1286 Rename job queue file 1287 1288 @note: This is a multi-node call with a timeout of 1m 0s 1289 @type node_list: list of string 1290 @param node_list: List of node names 1291 1292 """ 1293 return (self._Call(_def, node_list, [rename]))
1294
1295 - def call_jobqueue_set_drain_flag(self, node_list, flag, 1296 _def=_CALLS['jobqueue_set_drain_flag']):
1297 """Wrapper for RPC call 'jobqueue_set_drain_flag' 1298 1299 Set job queue drain flag 1300 1301 @note: This is a multi-node call with a timeout of 1m 0s 1302 @type node_list: list of string 1303 @param node_list: List of node names 1304 1305 """ 1306 return (self._Call(_def, node_list, [flag]))
1307
1308 - def call_jobqueue_update(self, node_list, file_name, content, 1309 _def=_CALLS['jobqueue_update']):
1310 """Wrapper for RPC call 'jobqueue_update' 1311 1312 Update job queue file 1313 1314 @note: This is a multi-node call with a timeout of 1m 0s 1315 @type node_list: list of string 1316 @param node_list: List of node names 1317 1318 """ 1319 return (self._Call(_def, node_list, [file_name, content]))
1320