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