1
2
3
4 """Automatically generated RPC client wrappers.
5
6 """
7
8 from ganeti import rpc_defs
9
10
11
13
14
15
16 _CALLS = rpc_defs.CALLS['RpcClientBootstrap']
17
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
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
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
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
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
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
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
124
125
126
127 _CALLS = rpc_defs.CALLS['RpcClientConfig']
128
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
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
157
158
159
160 _CALLS = rpc_defs.CALLS['RpcClientDefault']
161
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1259
1260
1261
1262 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly']
1263
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
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
1295
1296
1297
1298 _CALLS = rpc_defs.CALLS['RpcClientJobQueue']
1299
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
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
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
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