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, instance, on_primary, 220 idx, _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, instance, 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, disks, instance_name, 459 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, [disks, instance_name, 470 multimaster]))
471
472 - def call_drbd_disconnect_net(self, node_list, 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, [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, 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], [disks])[node])
509
510 - def call_drbd_wait_sync(self, node_list, 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, [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_hotplug_device(self, node, instance, action, dev_type, 689 device, extra, seq, _def=_CALLS['hotplug_device']):
690 """Wrapper for RPC call 'hotplug_device' 691 692 Hoplug a device to a running instance 693 694 @note: This is a single-node call with a timeout of 15m 0s 695 @type node: string 696 @param node: Node name 697 @param instance: Instance object 698 @param action: Hotplug Action 699 @param dev_type: Device type 700 @param device: Device dict 701 @param extra: Extra info for device (dev_path for disk) 702 @param seq: Device seq 703 704 """ 705 return (self._Call(_def, [node], [instance, action, dev_type, device, 706 extra, seq])[node])
707
708 - def call_hotplug_supported(self, node, instance, 709 _def=_CALLS['hotplug_supported']):
710 """Wrapper for RPC call 'hotplug_supported' 711 712 Check if hotplug is supported 713 714 @note: This is a single-node call with a timeout of 15m 0s 715 @type node: string 716 @param node: Node name 717 @param instance: Instance object 718 719 """ 720 return (self._Call(_def, [node], [instance])[node])
721
722 - def call_hypervisor_validate_params(self, node_list, hvname, hvfull, 723 _def=_CALLS['hypervisor_validate_params']):
724 """Wrapper for RPC call 'hypervisor_validate_params' 725 726 Validate hypervisor params 727 728 @note: This is a multi-node call with a timeout of 15m 0s 729 @type node_list: list of string 730 @param node_list: List of node names 731 @param hvname: Hypervisor name 732 @param hvfull: Parameters to be validated 733 734 """ 735 return (self._Call(_def, node_list, [hvname, hvfull]))
736
737 - def call_iallocator_runner(self, node, name, idata, 738 _def=_CALLS['iallocator_runner']):
739 """Wrapper for RPC call 'iallocator_runner' 740 741 Call an iallocator on a remote node 742 743 @note: This is a single-node call with a timeout of 15m 0s 744 @type node: string 745 @param node: Node name 746 @param name: Iallocator name 747 @param idata: JSON-encoded input string 748 749 """ 750 return (self._Call(_def, [node], [name, idata])[node])
751
752 - def call_impexp_abort(self, node, name, _def=_CALLS['impexp_abort']):
753 """Wrapper for RPC call 'impexp_abort' 754 755 Aborts an import or export 756 757 @note: This is a single-node call with a timeout of 15m 0s 758 @type node: string 759 @param node: Node name 760 @param name: Import/export name 761 762 """ 763 return (self._Call(_def, [node], [name])[node])
764
765 - def call_impexp_cleanup(self, node, name, 766 _def=_CALLS['impexp_cleanup']):
767 """Wrapper for RPC call 'impexp_cleanup' 768 769 Cleans up after an import or export 770 771 @note: This is a single-node call with a timeout of 15m 0s 772 @type node: string 773 @param node: Node name 774 @param name: Import/export name 775 776 """ 777 return (self._Call(_def, [node], [name])[node])
778
779 - def call_impexp_status(self, node, names, 780 _def=_CALLS['impexp_status']):
781 """Wrapper for RPC call 'impexp_status' 782 783 Gets the status of an import or export 784 785 @note: This is a single-node call with a timeout of 5m 0s 786 @type node: string 787 @param node: Node name 788 @param names: Import/export names 789 790 """ 791 return (self._Call(_def, [node], [names])[node])
792
793 - def call_import_start(self, node, opts, instance, component, dest, 794 _def=_CALLS['import_start']):
795 """Wrapper for RPC call 'import_start' 796 797 Starts an import daemon 798 799 @note: This is a single-node call with a timeout of 15m 0s 800 @type node: string 801 @param node: Node name 802 @param dest: Import destination 803 804 """ 805 return (self._Call(_def, [node], [opts, instance, component, 806 dest])[node])
807
808 - def call_instance_balloon_memory(self, node, instance, memory, 809 _def=_CALLS['instance_balloon_memory']):
810 """Wrapper for RPC call 'instance_balloon_memory' 811 812 Modify the amount of an instance's runtime memory 813 814 @note: This is a single-node call with a timeout of 15m 0s 815 @type node: string 816 @param node: Node name 817 @param instance: Instance object 818 819 """ 820 return (self._Call(_def, [node], [instance, memory])[node])
821
822 - def call_instance_finalize_migration_dst(self, node, instance, info, 823 success, _def=_CALLS['instance_finalize_migration_dst']):
824 """Wrapper for RPC call 'instance_finalize_migration_dst' 825 826 Finalize any target-node migration specific operation 827 828 @note: This is a single-node call with a timeout of 15m 0s 829 @type node: string 830 @param node: Node name 831 @param instance: Instance object 832 @param info: Result for the call_migration_info call 833 @param success: Whether the migration was a success or failure 834 835 """ 836 return (self._Call(_def, [node], [instance, info, success])[node])
837
838 - def call_instance_finalize_migration_src(self, node, instance, 839 success, live, _def=_CALLS['instance_finalize_migration_src']):
840 """Wrapper for RPC call 'instance_finalize_migration_src' 841 842 Finalize the instance migration on the source node 843 844 @note: This is a single-node call with a timeout of 1h 0m 0s 845 @type node: string 846 @param node: Node name 847 @param instance: Instance object 848 @param success: Whether the migration succeeded or not 849 @param live: Whether the user requested a live migration or not 850 851 """ 852 return (self._Call(_def, [node], [instance, success, live])[node])
853
854 - def call_instance_get_migration_status(self, node, instance, 855 _def=_CALLS['instance_get_migration_status']):
856 """Wrapper for RPC call 'instance_get_migration_status' 857 858 Report migration status 859 860 @note: This is a single-node call with a timeout of 1h 0m 0s 861 @type node: string 862 @param node: Node name 863 @param instance: Instance object 864 865 """ 866 return (self._Call(_def, [node], [instance])[node])
867
868 - def call_instance_info(self, node, instance, hname, hvparams, 869 _def=_CALLS['instance_info']):
870 """Wrapper for RPC call 'instance_info' 871 872 Returns information about a single instance 873 874 @note: This is a single-node call with a timeout of 1m 0s 875 @type node: string 876 @param node: Node name 877 @param instance: Instance name 878 @param hname: Hypervisor type 879 @param hvparams: Hypervisor parameters 880 881 """ 882 return (self._Call(_def, [node], [instance, hname, hvparams])[node])
883
884 - def call_instance_list(self, node_list, hypervisor_list, hvparams, 885 _def=_CALLS['instance_list']):
886 """Wrapper for RPC call 'instance_list' 887 888 Returns the list of running instances on the given nodes 889 890 @note: This is a multi-node call with a timeout of 1m 0s 891 @type node_list: list of string 892 @param node_list: List of node names 893 @param hypervisor_list: Hypervisors to query for instances 894 @param hvparams: Hvparams of all hypervisors 895 896 """ 897 return (self._Call(_def, node_list, [hypervisor_list, hvparams]))
898
899 - def call_instance_migratable(self, node, instance, 900 _def=_CALLS['instance_migratable']):
901 """Wrapper for RPC call 'instance_migratable' 902 903 Checks whether the given instance can be migrated 904 905 @note: This is a single-node call with a timeout of 15m 0s 906 @type node: string 907 @param node: Node name 908 @param instance: Instance object 909 910 """ 911 return (self._Call(_def, [node], [instance])[node])
912
913 - def call_instance_migrate(self, node, cluster_name, instance, target, 914 live, _def=_CALLS['instance_migrate']):
915 """Wrapper for RPC call 'instance_migrate' 916 917 Migrate an instance 918 919 @note: This is a single-node call with a timeout of 1h 0m 0s 920 @type node: string 921 @param node: Node name 922 @param cluster_name: Cluster name 923 @param instance: Instance object 924 @param target: Target node name 925 @param live: Whether the migration should be done live or not 926 927 """ 928 return (self._Call(_def, [node], [cluster_name, instance, target, 929 live])[node])
930
931 - def call_instance_os_add(self, node, instance_osp, reinstall, debug, 932 _def=_CALLS['instance_os_add']):
933 """Wrapper for RPC call 'instance_os_add' 934 935 Starts an instance 936 937 @note: This is a single-node call with a timeout of 1d 0h 0m 0s 938 @type node: string 939 @param node: Node name 940 941 """ 942 return (self._Call(_def, [node], [instance_osp, reinstall, 943 debug])[node])
944
945 - def call_instance_reboot(self, node, inst, reboot_type, 946 shutdown_timeout, reason, _def=_CALLS['instance_reboot']):
947 """Wrapper for RPC call 'instance_reboot' 948 949 Returns the list of running instances on the given nodes 950 951 @note: This is a single-node call with a timeout of 15m 0s 952 @type node: string 953 @param node: Node name 954 @param inst: Instance object 955 @param reason: The reason for the reboot 956 957 """ 958 return (self._Call(_def, [node], [inst, reboot_type, shutdown_timeout, 959 reason])[node])
960
961 - def call_instance_run_rename(self, node, instance, old_name, debug, 962 _def=_CALLS['instance_run_rename']):
963 """Wrapper for RPC call 'instance_run_rename' 964 965 Run the OS rename script for an instance 966 967 @note: This is a single-node call with a timeout of 1h 0m 0s 968 @type node: string 969 @param node: Node name 970 @param instance: Instance object 971 972 """ 973 return (self._Call(_def, [node], [instance, old_name, debug])[node])
974
975 - def call_instance_shutdown(self, node, instance, timeout, reason, 976 _def=_CALLS['instance_shutdown']):
977 """Wrapper for RPC call 'instance_shutdown' 978 979 Stops an instance 980 981 @note: This is a single-node call with a timeout of 15m 0s 982 @type node: string 983 @param node: Node name 984 @param instance: Instance object 985 @param reason: The reason for the shutdown 986 987 """ 988 return (self._Call(_def, [node], [instance, timeout, reason])[node])
989
990 - def call_instance_start(self, node, instance_hvp_bep, startup_paused, 991 reason, _def=_CALLS['instance_start']):
992 """Wrapper for RPC call 'instance_start' 993 994 Starts an instance 995 996 @note: This is a single-node call with a timeout of 15m 0s 997 @type node: string 998 @param node: Node name 999 @param reason: The reason for the startup 1000 1001 """ 1002 return (self._Call(_def, [node], [instance_hvp_bep, startup_paused, 1003 reason])[node])
1004
1005 - def call_lv_list(self, node_list, vg_name, _def=_CALLS['lv_list']):
1006 """Wrapper for RPC call 'lv_list' 1007 1008 Gets the logical volumes present in a given volume group 1009 1010 @note: This is a multi-node call with a timeout of 1m 0s 1011 @type node_list: list of string 1012 @param node_list: List of node names 1013 1014 """ 1015 return (self._Call(_def, node_list, [vg_name]))
1016
1017 - def call_migration_info(self, node, instance, 1018 _def=_CALLS['migration_info']):
1019 """Wrapper for RPC call 'migration_info' 1020 1021 Gather the information necessary to prepare an instance migration 1022 1023 @note: This is a single-node call with a timeout of 15m 0s 1024 @type node: string 1025 @param node: Node name 1026 @param instance: Instance object 1027 1028 """ 1029 return (self._Call(_def, [node], [instance])[node])
1030
1031 - def call_node_configure_ovs(self, node, ovs_name, ovs_link, 1032 _def=_CALLS['node_configure_ovs']):
1033 """Wrapper for RPC call 'node_configure_ovs' 1034 1035 This will create and setup the OpenvSwitch 1036 1037 @note: This is a single-node call with a timeout of 15m 0s 1038 @type node: string 1039 @param node: Node name 1040 @param ovs_name: Name of the OpenvSwitch to create 1041 @param ovs_link: Link of the OpenvSwitch to the outside 1042 1043 """ 1044 return (self._Call(_def, [node], [ovs_name, ovs_link])[node])
1045
1046 - def call_node_demote_from_mc(self, node, 1047 _def=_CALLS['node_demote_from_mc']):
1048 """Wrapper for RPC call 'node_demote_from_mc' 1049 1050 Demote a node from the master candidate role 1051 1052 @note: This is a single-node call with a timeout of 5m 0s 1053 @type node: string 1054 @param node: Node name 1055 1056 """ 1057 return (self._Call(_def, [node], [])[node])
1058
1059 - def call_node_has_ip_address(self, node, address, 1060 _def=_CALLS['node_has_ip_address']):
1061 """Wrapper for RPC call 'node_has_ip_address' 1062 1063 Checks if a node has the given IP address 1064 1065 @note: This is a single-node call with a timeout of 5m 0s 1066 @type node: string 1067 @param node: Node name 1068 @param address: IP address 1069 1070 """ 1071 return (self._Call(_def, [node], [address])[node])
1072
1073 - def call_node_info(self, node_list, storage_units, hv_specs, 1074 _def=_CALLS['node_info']):
1075 """Wrapper for RPC call 'node_info' 1076 1077 Return node information 1078 1079 @note: This is a multi-node call with a timeout of 1m 0s 1080 @type node_list: list of string 1081 @param node_list: List of node names 1082 @param storage_units: List of tuples '<storage_type>,<key>,[<param>]' 1083 to ask for disk space information; the parameter list varies 1084 depending on the storage_type 1085 @param hv_specs: List of hypervisor specification (name, hvparams) to 1086 ask for node information 1087 1088 """ 1089 return (self._Call(_def, node_list, [storage_units, hv_specs]))
1090
1091 - def call_node_powercycle(self, node, hypervisor, hvparams, 1092 _def=_CALLS['node_powercycle']):
1093 """Wrapper for RPC call 'node_powercycle' 1094 1095 Tries to powercycle a node 1096 1097 @note: This is a single-node call with a timeout of 15m 0s 1098 @type node: string 1099 @param node: Node name 1100 @param hypervisor: Hypervisor type 1101 @param hvparams: Hypervisor parameters 1102 1103 """ 1104 return (self._Call(_def, [node], [hypervisor, hvparams])[node])
1105
1106 - def call_node_verify(self, node_list, checkdict, cluster_name, 1107 all_hvparams, _def=_CALLS['node_verify']):
1108 """Wrapper for RPC call 'node_verify' 1109 1110 Request verification of given parameters 1111 1112 @note: This is a multi-node call with a timeout of 15m 0s 1113 @type node_list: list of string 1114 @param node_list: List of node names 1115 @param checkdict: What to verify 1116 @param cluster_name: Cluster name 1117 @param all_hvparams: Dictionary mapping hypervisor names to hvparams 1118 1119 """ 1120 return (self._Call(_def, node_list, [checkdict, cluster_name, 1121 all_hvparams]))
1122
1123 - def call_node_volumes(self, node_list, _def=_CALLS['node_volumes']):
1124 """Wrapper for RPC call 'node_volumes' 1125 1126 Gets all volumes on node(s) 1127 1128 @note: This is a multi-node call with a timeout of 5m 0s 1129 @type node_list: list of string 1130 @param node_list: List of node names 1131 1132 """ 1133 return (self._Call(_def, node_list, []))
1134
1135 - def call_os_diagnose(self, node_list, _def=_CALLS['os_diagnose']):
1136 """Wrapper for RPC call 'os_diagnose' 1137 1138 Request a diagnose of OS definitions 1139 1140 @note: This is a multi-node call with a timeout of 5m 0s 1141 @type node_list: list of string 1142 @param node_list: List of node names 1143 1144 """ 1145 return (self._Call(_def, node_list, []))
1146
1147 - def call_os_get(self, node, name, _def=_CALLS['os_get']):
1148 """Wrapper for RPC call 'os_get' 1149 1150 Returns an OS definition 1151 1152 @note: This is a single-node call with a timeout of 5m 0s 1153 @type node: string 1154 @param node: Node name 1155 1156 """ 1157 return (self._Call(_def, [node], [name])[node])
1158
1159 - def call_os_validate(self, node_list, required, name, checks, params, 1160 _def=_CALLS['os_validate']):
1161 """Wrapper for RPC call 'os_validate' 1162 1163 Run a validation routine for a given OS 1164 1165 @note: This is a multi-node call with a timeout of 5m 0s 1166 @type node_list: list of string 1167 @param node_list: List of node names 1168 1169 """ 1170 return (self._Call(_def, node_list, [required, name, checks, params]))
1171
1172 - def call_restricted_command(self, node_list, cmd, 1173 _def=_CALLS['restricted_command']):
1174 """Wrapper for RPC call 'restricted_command' 1175 1176 Runs restricted command 1177 1178 @note: This is a multi-node call with a timeout of 1h 0m 0s 1179 @type node_list: list of string 1180 @param node_list: List of node names 1181 @param cmd: Command name 1182 1183 """ 1184 return (self._Call(_def, node_list, [cmd]))
1185
1186 - def call_run_oob(self, node, oob_program, command, remote_node, 1187 timeout, _def=_CALLS['run_oob']):
1188 """Wrapper for RPC call 'run_oob' 1189 1190 Runs out-of-band command 1191 1192 @note: This is a single-node call with a timeout of 15m 0s 1193 @type node: string 1194 @param node: Node name 1195 1196 """ 1197 return (self._Call(_def, [node], [oob_program, command, remote_node, 1198 timeout])[node])
1199
1200 - def call_set_watcher_pause(self, node_list, until, 1201 _def=_CALLS['set_watcher_pause']):
1202 """Wrapper for RPC call 'set_watcher_pause' 1203 1204 Set watcher pause end 1205 1206 @note: This is a multi-node call with a timeout of 1m 0s 1207 @type node_list: list of string 1208 @param node_list: List of node names 1209 1210 """ 1211 return (self._Call(_def, node_list, [until]))
1212
1213 - def call_storage_execute(self, node, su_name, su_args, name, op, 1214 _def=_CALLS['storage_execute']):
1215 """Wrapper for RPC call 'storage_execute' 1216 1217 Executes an operation on a storage unit 1218 1219 @note: This is a single-node call with a timeout of 15m 0s 1220 @type node: string 1221 @param node: Node name 1222 1223 """ 1224 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1225
1226 - def call_storage_list(self, node_list, su_name, su_args, name, fields, 1227 _def=_CALLS['storage_list']):
1228 """Wrapper for RPC call 'storage_list' 1229 1230 Get list of storage units 1231 1232 @note: This is a multi-node call with a timeout of 15m 0s 1233 @type node_list: list of string 1234 @param node_list: List of node names 1235 1236 """ 1237 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1238
1239 - def call_storage_modify(self, node, su_name, su_args, name, changes, 1240 _def=_CALLS['storage_modify']):
1241 """Wrapper for RPC call 'storage_modify' 1242 1243 Modify a storage unit 1244 1245 @note: This is a single-node call with a timeout of 15m 0s 1246 @type node: string 1247 @param node: Node name 1248 1249 """ 1250 return (self._Call(_def, [node], [su_name, su_args, name, 1251 changes])[node])
1252
1253 - def call_test_delay(self, node_list, duration, 1254 _def=_CALLS['test_delay']):
1255 """Wrapper for RPC call 'test_delay' 1256 1257 Sleep for a fixed time on given node(s) 1258 1259 @note: This is a multi-node call 1260 @type node_list: list of string 1261 @param node_list: List of node names 1262 1263 """ 1264 return (self._Call(_def, node_list, [duration]))
1265
1266 - def call_vg_list(self, node_list, _def=_CALLS['vg_list']):
1267 """Wrapper for RPC call 'vg_list' 1268 1269 Gets the volume group list 1270 1271 @note: This is a multi-node call with a timeout of 1m 0s 1272 @type node_list: list of string 1273 @param node_list: List of node names 1274 1275 """ 1276 return (self._Call(_def, node_list, []))
1277
1278 - def call_x509_cert_create(self, node, validity, 1279 _def=_CALLS['x509_cert_create']):
1280 """Wrapper for RPC call 'x509_cert_create' 1281 1282 Creates a new X509 certificate for SSL/TLS 1283 1284 @note: This is a single-node call with a timeout of 15m 0s 1285 @type node: string 1286 @param node: Node name 1287 @param validity: Validity in seconds 1288 1289 """ 1290 return (self._Call(_def, [node], [validity])[node])
1291
1292 - def call_x509_cert_remove(self, node, name, 1293 _def=_CALLS['x509_cert_remove']):
1294 """Wrapper for RPC call 'x509_cert_remove' 1295 1296 Removes a X509 certificate 1297 1298 @note: This is a single-node call with a timeout of 15m 0s 1299 @type node: string 1300 @param node: Node name 1301 @param name: Certificate name 1302 1303 """ 1304 return (self._Call(_def, [node], [name])[node])
1305 1306
1307 -class RpcClientDnsOnly(object):
1308 # E1101: Non-existent members 1309 # R0904: Too many public methods 1310 # pylint: disable=E1101,R0904 1311 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly'] 1312
1313 - def call_node_verify_light(self, node_list, checkdict, cluster_name, 1314 hvparams, _def=_CALLS['node_verify_light']):
1315 """Wrapper for RPC call 'node_verify_light' 1316 1317 Request verification of given parameters 1318 1319 @note: This is a multi-node call with a timeout of 15m 0s 1320 @type node_list: list of string 1321 @param node_list: List of node names 1322 @param checkdict: What to verify 1323 @param cluster_name: Cluster name 1324 @param hvparams: Dictionary mapping hypervisor names to hvparams 1325 1326 """ 1327 return (self._Call(_def, node_list, [checkdict, cluster_name, 1328 hvparams]))
1329
1330 - def call_version(self, node_list, _def=_CALLS['version']):
1331 """Wrapper for RPC call 'version' 1332 1333 Query node version 1334 1335 @note: This is a multi-node call with a timeout of 1m 0s 1336 @type node_list: list of string 1337 @param node_list: List of node names 1338 1339 """ 1340 return (self._Call(_def, node_list, []))
1341 1342
1343 -class RpcClientJobQueue(object):
1344 # E1101: Non-existent members 1345 # R0904: Too many public methods 1346 # pylint: disable=E1101,R0904 1347 _CALLS = rpc_defs.CALLS['RpcClientJobQueue'] 1348
1349 - def call_jobqueue_purge(self, node, _def=_CALLS['jobqueue_purge']):
1350 """Wrapper for RPC call 'jobqueue_purge' 1351 1352 Purge job queue 1353 1354 @note: This is a single-node call with a timeout of 15m 0s 1355 @type node: string 1356 @param node: Node name 1357 1358 """ 1359 return (self._Call(_def, [node], [])[node])
1360
1361 - def call_jobqueue_rename(self, node_list, rename, 1362 _def=_CALLS['jobqueue_rename']):
1363 """Wrapper for RPC call 'jobqueue_rename' 1364 1365 Rename job queue file 1366 1367 @note: This is a multi-node call with a timeout of 1m 0s 1368 @type node_list: list of string 1369 @param node_list: List of node names 1370 1371 """ 1372 return (self._Call(_def, node_list, [rename]))
1373
1374 - def call_jobqueue_set_drain_flag(self, node_list, flag, 1375 _def=_CALLS['jobqueue_set_drain_flag']):
1376 """Wrapper for RPC call 'jobqueue_set_drain_flag' 1377 1378 Set job queue drain flag 1379 1380 @note: This is a multi-node call with a timeout of 1m 0s 1381 @type node_list: list of string 1382 @param node_list: List of node names 1383 1384 """ 1385 return (self._Call(_def, node_list, [flag]))
1386
1387 - def call_jobqueue_update(self, node_list, file_name, content, 1388 _def=_CALLS['jobqueue_update']):
1389 """Wrapper for RPC call 'jobqueue_update' 1390 1391 Update job queue file 1392 1393 @note: This is a multi-node call with a timeout of 1m 0s 1394 @type node_list: list of string 1395 @param node_list: List of node names 1396 1397 """ 1398 return (self._Call(_def, node_list, [file_name, content]))
1399