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