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
189 """
190 return (self._Call(_def, node_list, [hypervisor_list]))
191
194 """Wrapper for RPC call 'bdev_sizes'
195
196 Gets the sizes of requested block devices present on a node
197
198 @note: This is a multi-node call with a timeout of 1m 0s
199 @type node_list: list of string
200 @param node_list: List of node names
201
202 """
203 return (self._Call(_def, node_list, [devices]))
204
207 """Wrapper for RPC call 'blockdev_addchildren'
208
209 Request adding a list of children to a (mirroring) device
210
211 @note: This is a single-node call with a timeout of 15m 0s
212 @type node: string
213 @param node: Node name
214
215 """
216 return (self._Call(_def, [node], [bdev, ndevs])[node])
217
220 """Wrapper for RPC call 'blockdev_assemble'
221
222 Request assembling of a given block device
223
224 @note: This is a single-node call with a timeout of 15m 0s
225 @type node: string
226 @param node: Node name
227
228 """
229 return (self._Call(_def, [node], [disk, owner, on_primary,
230 idx])[node])
231
234 """Wrapper for RPC call 'blockdev_close'
235
236 Closes the given block devices
237
238 @note: This is a single-node call with a timeout of 15m 0s
239 @type node: string
240 @param node: Node name
241
242 """
243 return (self._Call(_def, [node], [instance_name, disks])[node])
244
245 - def call_blockdev_create(self, node, bdev, size, owner, on_primary,
246 info, exclusive_storage, _def=_CALLS['blockdev_create']):
247 """Wrapper for RPC call 'blockdev_create'
248
249 Request creation of a given block device
250
251 @note: This is a single-node call with a timeout of 15m 0s
252 @type node: string
253 @param node: Node name
254
255 """
256 return (self._Call(_def, [node], [bdev, size, owner, on_primary, info,
257 exclusive_storage])[node])
258
261 """Wrapper for RPC call 'blockdev_export'
262
263 Export a given disk to another node
264
265 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
266 @type node: string
267 @param node: Node name
268
269 """
270 return (self._Call(_def, [node], [cf_bdev, dest_node, dest_path,
271 cluster_name])[node])
272
275 """Wrapper for RPC call 'blockdev_find'
276
277 Request identification of a given block device
278
279 @note: This is a single-node call with a timeout of 15m 0s
280 @type node: string
281 @param node: Node name
282
283 """
284 return (self._Call(_def, [node], [disk])[node])
285
288 """Wrapper for RPC call 'blockdev_getmirrorstatus'
289
290 Request status of a (mirroring) device
291
292 @note: This is a single-node call with a timeout of 15m 0s
293 @type node: string
294 @param node: Node name
295
296 """
297 return (self._Call(_def, [node], [disks])[node])
298
301 """Wrapper for RPC call 'blockdev_getmirrorstatus_multi'
302
303 Request status of (mirroring) devices from multiple nodes
304
305 @note: This is a multi-node call with a timeout of 15m 0s
306 @type node_list: list of string
307 @param node_list: List of node names
308
309 """
310 return (self._Call(_def, node_list, [node_disks]))
311
314 """Wrapper for RPC call 'blockdev_getsize'
315
316 Returns the size of the given disks
317
318 @note: This is a single-node call with a timeout of 15m 0s
319 @type node: string
320 @param node: Node name
321
322 """
323 return (self._Call(_def, [node], [disks])[node])
324
327 """Wrapper for RPC call 'blockdev_grow'
328
329 Request growing of the given block device by a given amount
330
331 @note: This is a single-node call with a timeout of 15m 0s
332 @type node: string
333 @param node: Node name
334
335 """
336 return (self._Call(_def, [node], [cf_bdev, amount, dryrun,
337 backingstore])[node])
338
341 """Wrapper for RPC call 'blockdev_pause_resume_sync'
342
343 Request a pause/resume of given block device
344
345 @note: This is a single-node call with a timeout of 15m 0s
346 @type node: string
347 @param node: Node name
348
349 """
350 return (self._Call(_def, [node], [disks, pause])[node])
351
354 """Wrapper for RPC call 'blockdev_remove'
355
356 Request removal of a given block device
357
358 @note: This is a single-node call with a timeout of 15m 0s
359 @type node: string
360 @param node: Node name
361
362 """
363 return (self._Call(_def, [node], [bdev])[node])
364
367 """Wrapper for RPC call 'blockdev_removechildren'
368
369 Request removing a list of children from a (mirroring) device
370
371 @note: This is a single-node call with a timeout of 15m 0s
372 @type node: string
373 @param node: Node name
374
375 """
376 return (self._Call(_def, [node], [bdev, ndevs])[node])
377
380 """Wrapper for RPC call 'blockdev_rename'
381
382 Request rename of the given block devices
383
384 @note: This is a single-node call with a timeout of 15m 0s
385 @type node: string
386 @param node: Node name
387
388 """
389 return (self._Call(_def, [node], [devlist])[node])
390
393 """Wrapper for RPC call 'blockdev_setinfo'
394
395 Sets metadata information on a given block device
396
397 @note: This is a single-node call with a timeout of 15m 0s
398 @type node: string
399 @param node: Node name
400
401 """
402 return (self._Call(_def, [node], [disk, info])[node])
403
406 """Wrapper for RPC call 'blockdev_shutdown'
407
408 Request shutdown of a given block device
409
410 @note: This is a single-node call with a timeout of 15m 0s
411 @type node: string
412 @param node: Node name
413
414 """
415 return (self._Call(_def, [node], [disk])[node])
416
419 """Wrapper for RPC call 'blockdev_snapshot'
420
421 Export a given disk to another node
422
423 @note: This is a single-node call with a timeout of 15m 0s
424 @type node: string
425 @param node: Node name
426
427 """
428 return (self._Call(_def, [node], [cf_bdev])[node])
429
432 """Wrapper for RPC call 'blockdev_wipe'
433
434 Request wipe at given offset with given size of a block device
435
436 @note: This is a single-node call with a timeout of 1h 0m 0s
437 @type node: string
438 @param node: Node name
439
440 """
441 return (self._Call(_def, [node], [bdev, offset, size])[node])
442
445 """Wrapper for RPC call 'bridges_exist'
446
447 Checks if a node has all the bridges given
448
449 @note: This is a single-node call with a timeout of 1m 0s
450 @type node: string
451 @param node: Node name
452 @param bridges_list: Bridges which must be present on remote node
453
454 """
455 return (self._Call(_def, [node], [bridges_list])[node])
456
459 """Wrapper for RPC call 'drbd_attach_net'
460
461 Connects the given DRBD devices
462
463 @note: This is a multi-node call with a timeout of 15m 0s
464 @type node_list: list of string
465 @param node_list: List of node names
466
467 """
468 return (self._Call(_def, node_list, [nodes_ip, disks, instance_name,
469 multimaster]))
470
473 """Wrapper for RPC call 'drbd_disconnect_net'
474
475 Disconnects the network of the given drbd devices
476
477 @note: This is a multi-node call with a timeout of 15m 0s
478 @type node_list: list of string
479 @param node_list: List of node names
480
481 """
482 return (self._Call(_def, node_list, [nodes_ip, disks]))
483
485 """Wrapper for RPC call 'drbd_helper'
486
487 Gets DRBD helper
488
489 @note: This is a multi-node call with a timeout of 1m 0s
490 @type node_list: list of string
491 @param node_list: List of node names
492
493 """
494 return (self._Call(_def, node_list, []))
495
498 """Wrapper for RPC call 'drbd_wait_sync'
499
500 Waits for the synchronization of drbd devices is complete
501
502 @note: This is a multi-node call with a timeout of 1h 0m 0s
503 @type node_list: list of string
504 @param node_list: List of node names
505
506 """
507 return (self._Call(_def, node_list, [nodes_ip, disks]))
508
511 """Wrapper for RPC call 'etc_hosts_modify'
512
513 Modify hosts file with name
514
515 @note: This is a single-node call with a timeout of 15m 0s
516 @type node: string
517 @param node: Node name
518 @param mode: Mode to operate; currently L{constants.ETC_HOSTS_ADD} or
519 L{constants.ETC_HOSTS_REMOVE}
520 @param name: Hostname to be modified
521 @param ip: IP address (L{constants.ETC_HOSTS_ADD} only)
522
523 """
524 return (self._Call(_def, [node], [mode, name, ip])[node])
525
527 """Wrapper for RPC call 'export_info'
528
529 Queries the export information in a given path
530
531 @note: This is a single-node call with a timeout of 5m 0s
532 @type node: string
533 @param node: Node name
534
535 """
536 return (self._Call(_def, [node], [path])[node])
537
539 """Wrapper for RPC call 'export_list'
540
541 Gets the stored exports list
542
543 @note: This is a multi-node call with a timeout of 5m 0s
544 @type node_list: list of string
545 @param node_list: List of node names
546
547 """
548 return (self._Call(_def, node_list, []))
549
552 """Wrapper for RPC call 'export_remove'
553
554 Requests removal of a given export
555
556 @note: This is a single-node call with a timeout of 5m 0s
557 @type node: string
558 @param node: Node name
559
560 """
561 return (self._Call(_def, [node], [export])[node])
562
563 - def call_export_start(self, node, opts, host, port, instance,
564 component, source, _def=_CALLS['export_start']):
565 """Wrapper for RPC call 'export_start'
566
567 Starts an export daemon
568
569 @note: This is a single-node call with a timeout of 15m 0s
570 @type node: string
571 @param node: Node name
572 @param source: Export source
573
574 """
575 return (self._Call(_def, [node], [opts, host, port, instance,
576 component, source])[node])
577
580 """Wrapper for RPC call 'extstorage_diagnose'
581
582 Request a diagnose of ExtStorage Providers
583
584 @note: This is a multi-node call with a timeout of 5m 0s
585 @type node_list: list of string
586 @param node_list: List of node names
587
588 """
589 return (self._Call(_def, node_list, []))
590
593 """Wrapper for RPC call 'file_storage_dir_create'
594
595 Create the given file storage directory
596
597 @note: This is a single-node call with a timeout of 5m 0s
598 @type node: string
599 @param node: Node name
600 @param file_storage_dir: File storage directory
601
602 """
603 return (self._Call(_def, [node], [file_storage_dir])[node])
604
607 """Wrapper for RPC call 'file_storage_dir_remove'
608
609 Remove the given file storage directory
610
611 @note: This is a single-node call with a timeout of 5m 0s
612 @type node: string
613 @param node: Node name
614 @param file_storage_dir: File storage directory
615
616 """
617 return (self._Call(_def, [node], [file_storage_dir])[node])
618
621 """Wrapper for RPC call 'file_storage_dir_rename'
622
623 Rename file storage directory
624
625 @note: This is a single-node call with a timeout of 5m 0s
626 @type node: string
627 @param node: Node name
628 @param old_file_storage_dir: Old name
629 @param new_file_storage_dir: New name
630
631 """
632 return (self._Call(_def, [node], [old_file_storage_dir,
633 new_file_storage_dir])[node])
634
637 """Wrapper for RPC call 'finalize_export'
638
639 Request the completion of an export operation
640
641 @note: This is a single-node call with a timeout of 15m 0s
642 @type node: string
643 @param node: Node name
644
645 """
646 return (self._Call(_def, [node], [instance, snap_disks])[node])
647
650 """Wrapper for RPC call 'get_watcher_pause'
651
652 Get watcher pause end
653
654 @note: This is a single-node call with a timeout of 1m 0s
655 @type node: string
656 @param node: Node name
657
658 """
659 return (self._Call(_def, [node], [])[node])
660
663 """Wrapper for RPC call 'hooks_runner'
664
665 Call the hooks runner
666
667 @note: This is a multi-node call with a timeout of 15m 0s
668 @type node_list: list of string
669 @param node_list: List of node names
670
671 """
672 return (self._Call(_def, node_list, [hpath, phase, env]))
673
676 """Wrapper for RPC call 'hypervisor_validate_params'
677
678 Validate hypervisor params
679
680 @note: This is a multi-node call with a timeout of 15m 0s
681 @type node_list: list of string
682 @param node_list: List of node names
683 @param hvname: Hypervisor name
684 @param hvfull: Parameters to be validated
685
686 """
687 return (self._Call(_def, node_list, [hvname, hvfull]))
688
691 """Wrapper for RPC call 'iallocator_runner'
692
693 Call an iallocator on a remote node
694
695 @note: This is a single-node call with a timeout of 15m 0s
696 @type node: string
697 @param node: Node name
698 @param name: Iallocator name
699 @param idata: JSON-encoded input string
700
701 """
702 return (self._Call(_def, [node], [name, idata])[node])
703
705 """Wrapper for RPC call 'impexp_abort'
706
707 Aborts an import or export
708
709 @note: This is a single-node call with a timeout of 15m 0s
710 @type node: string
711 @param node: Node name
712 @param name: Import/export name
713
714 """
715 return (self._Call(_def, [node], [name])[node])
716
719 """Wrapper for RPC call 'impexp_cleanup'
720
721 Cleans up after an import or export
722
723 @note: This is a single-node call with a timeout of 15m 0s
724 @type node: string
725 @param node: Node name
726 @param name: Import/export name
727
728 """
729 return (self._Call(_def, [node], [name])[node])
730
733 """Wrapper for RPC call 'impexp_status'
734
735 Gets the status of an import or export
736
737 @note: This is a single-node call with a timeout of 5m 0s
738 @type node: string
739 @param node: Node name
740 @param names: Import/export names
741
742 """
743 return (self._Call(_def, [node], [names])[node])
744
747 """Wrapper for RPC call 'import_start'
748
749 Starts an import daemon
750
751 @note: This is a single-node call with a timeout of 15m 0s
752 @type node: string
753 @param node: Node name
754 @param dest: Import destination
755
756 """
757 return (self._Call(_def, [node], [opts, instance, component,
758 dest])[node])
759
762 """Wrapper for RPC call 'instance_balloon_memory'
763
764 Modify the amount of an instance's runtime memory
765
766 @note: This is a single-node call with a timeout of 15m 0s
767 @type node: string
768 @param node: Node name
769 @param instance: Instance object
770
771 """
772 return (self._Call(_def, [node], [instance, memory])[node])
773
776 """Wrapper for RPC call 'instance_finalize_migration_dst'
777
778 Finalize any target-node migration specific operation
779
780 @note: This is a single-node call with a timeout of 15m 0s
781 @type node: string
782 @param node: Node name
783 @param instance: Instance object
784 @param info: Result for the call_migration_info call
785 @param success: Whether the migration was a success or failure
786
787 """
788 return (self._Call(_def, [node], [instance, info, success])[node])
789
792 """Wrapper for RPC call 'instance_finalize_migration_src'
793
794 Finalize the instance migration on the source node
795
796 @note: This is a single-node call with a timeout of 1h 0m 0s
797 @type node: string
798 @param node: Node name
799 @param instance: Instance object
800 @param success: Whether the migration succeeded or not
801 @param live: Whether the user requested a live migration or not
802
803 """
804 return (self._Call(_def, [node], [instance, success, live])[node])
805
808 """Wrapper for RPC call 'instance_get_migration_status'
809
810 Report migration status
811
812 @note: This is a single-node call with a timeout of 1h 0m 0s
813 @type node: string
814 @param node: Node name
815 @param instance: Instance object
816
817 """
818 return (self._Call(_def, [node], [instance])[node])
819
822 """Wrapper for RPC call 'instance_info'
823
824 Returns information about a single instance
825
826 @note: This is a single-node call with a timeout of 1m 0s
827 @type node: string
828 @param node: Node name
829 @param instance: Instance name
830 @param hname: Hypervisor type
831
832 """
833 return (self._Call(_def, [node], [instance, hname])[node])
834
837 """Wrapper for RPC call 'instance_list'
838
839 Returns the list of running instances on the given nodes
840
841 @note: This is a multi-node call with a timeout of 1m 0s
842 @type node_list: list of string
843 @param node_list: List of node names
844 @param hypervisor_list: Hypervisors to query for instances
845
846 """
847 return (self._Call(_def, node_list, [hypervisor_list]))
848
851 """Wrapper for RPC call 'instance_migratable'
852
853 Checks whether the given instance can be migrated
854
855 @note: This is a single-node call with a timeout of 15m 0s
856 @type node: string
857 @param node: Node name
858 @param instance: Instance object
859
860 """
861 return (self._Call(_def, [node], [instance])[node])
862
865 """Wrapper for RPC call 'instance_migrate'
866
867 Migrate an instance
868
869 @note: This is a single-node call with a timeout of 1h 0m 0s
870 @type node: string
871 @param node: Node name
872 @param instance: Instance object
873 @param target: Target node name
874 @param live: Whether the migration should be done live or not
875
876 """
877 return (self._Call(_def, [node], [instance, target, live])[node])
878
881 """Wrapper for RPC call 'instance_os_add'
882
883 Starts an instance
884
885 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
886 @type node: string
887 @param node: Node name
888
889 """
890 return (self._Call(_def, [node], [instance_osp, reinstall,
891 debug])[node])
892
895 """Wrapper for RPC call 'instance_reboot'
896
897 Returns the list of running instances on the given nodes
898
899 @note: This is a single-node call with a timeout of 15m 0s
900 @type node: string
901 @param node: Node name
902 @param inst: Instance object
903 @param reason: The reason for the reboot
904
905 """
906 return (self._Call(_def, [node], [inst, reboot_type, shutdown_timeout,
907 reason])[node])
908
911 """Wrapper for RPC call 'instance_run_rename'
912
913 Run the OS rename script for an instance
914
915 @note: This is a single-node call with a timeout of 1h 0m 0s
916 @type node: string
917 @param node: Node name
918 @param instance: Instance object
919
920 """
921 return (self._Call(_def, [node], [instance, old_name, debug])[node])
922
925 """Wrapper for RPC call 'instance_shutdown'
926
927 Stops an instance
928
929 @note: This is a single-node call with a timeout of 15m 0s
930 @type node: string
931 @param node: Node name
932 @param instance: Instance object
933 @param reason: The reason for the shutdown
934
935 """
936 return (self._Call(_def, [node], [instance, timeout, reason])[node])
937
940 """Wrapper for RPC call 'instance_start'
941
942 Starts an instance
943
944 @note: This is a single-node call with a timeout of 15m 0s
945 @type node: string
946 @param node: Node name
947 @param reason: The reason for the startup
948
949 """
950 return (self._Call(_def, [node], [instance_hvp_bep, startup_paused,
951 reason])[node])
952
954 """Wrapper for RPC call 'lv_list'
955
956 Gets the logical volumes present in a given volume group
957
958 @note: This is a multi-node call with a timeout of 1m 0s
959 @type node_list: list of string
960 @param node_list: List of node names
961
962 """
963 return (self._Call(_def, node_list, [vg_name]))
964
967 """Wrapper for RPC call 'migration_info'
968
969 Gather the information necessary to prepare an instance migration
970
971 @note: This is a single-node call with a timeout of 15m 0s
972 @type node: string
973 @param node: Node name
974 @param instance: Instance object
975
976 """
977 return (self._Call(_def, [node], [instance])[node])
978
981 """Wrapper for RPC call 'node_demote_from_mc'
982
983 Demote a node from the master candidate role
984
985 @note: This is a single-node call with a timeout of 5m 0s
986 @type node: string
987 @param node: Node name
988
989 """
990 return (self._Call(_def, [node], [])[node])
991
994 """Wrapper for RPC call 'node_has_ip_address'
995
996 Checks if a node has the given IP address
997
998 @note: This is a single-node call with a timeout of 5m 0s
999 @type node: string
1000 @param node: Node name
1001 @param address: IP address
1002
1003 """
1004 return (self._Call(_def, [node], [address])[node])
1005
1006 - def call_node_info(self, node_list, vg_names, hv_names,
1007 exclusive_storage, _def=_CALLS['node_info']):
1008 """Wrapper for RPC call 'node_info'
1009
1010 Return node information
1011
1012 @note: This is a multi-node call with a timeout of 1m 0s
1013 @type node_list: list of string
1014 @param node_list: List of node names
1015 @param vg_names: Names of the volume groups to ask for disk space
1016 information
1017 @param hv_names: Names of the hypervisors to ask for node information
1018 @param exclusive_storage: Whether exclusive storage is enabled
1019
1020 """
1021 return (self._Call(_def, node_list, [vg_names, hv_names,
1022 exclusive_storage]))
1023
1026 """Wrapper for RPC call 'node_powercycle'
1027
1028 Tries to powercycle a node
1029
1030 @note: This is a single-node call with a timeout of 15m 0s
1031 @type node: string
1032 @param node: Node name
1033 @param hypervisor: Hypervisor type
1034
1035 """
1036 return (self._Call(_def, [node], [hypervisor])[node])
1037
1040 """Wrapper for RPC call 'node_verify'
1041
1042 Request verification of given parameters
1043
1044 @note: This is a multi-node call with a timeout of 15m 0s
1045 @type node_list: list of string
1046 @param node_list: List of node names
1047
1048 """
1049 return (self._Call(_def, node_list, [checkdict, cluster_name]))
1050
1052 """Wrapper for RPC call 'node_volumes'
1053
1054 Gets all volumes on node(s)
1055
1056 @note: This is a multi-node call with a timeout of 5m 0s
1057 @type node_list: list of string
1058 @param node_list: List of node names
1059
1060 """
1061 return (self._Call(_def, node_list, []))
1062
1064 """Wrapper for RPC call 'os_diagnose'
1065
1066 Request a diagnose of OS definitions
1067
1068 @note: This is a multi-node call with a timeout of 5m 0s
1069 @type node_list: list of string
1070 @param node_list: List of node names
1071
1072 """
1073 return (self._Call(_def, node_list, []))
1074
1076 """Wrapper for RPC call 'os_get'
1077
1078 Returns an OS definition
1079
1080 @note: This is a single-node call with a timeout of 5m 0s
1081 @type node: string
1082 @param node: Node name
1083
1084 """
1085 return (self._Call(_def, [node], [name])[node])
1086
1089 """Wrapper for RPC call 'os_validate'
1090
1091 Run a validation routine for a given OS
1092
1093 @note: This is a multi-node call with a timeout of 5m 0s
1094 @type node_list: list of string
1095 @param node_list: List of node names
1096
1097 """
1098 return (self._Call(_def, node_list, [required, name, checks, params]))
1099
1102 """Wrapper for RPC call 'restricted_command'
1103
1104 Runs restricted command
1105
1106 @note: This is a multi-node call with a timeout of 1h 0m 0s
1107 @type node_list: list of string
1108 @param node_list: List of node names
1109 @param cmd: Command name
1110
1111 """
1112 return (self._Call(_def, node_list, [cmd]))
1113
1114 - def call_run_oob(self, node, oob_program, command, remote_node,
1115 timeout, _def=_CALLS['run_oob']):
1116 """Wrapper for RPC call 'run_oob'
1117
1118 Runs out-of-band command
1119
1120 @note: This is a single-node call with a timeout of 15m 0s
1121 @type node: string
1122 @param node: Node name
1123
1124 """
1125 return (self._Call(_def, [node], [oob_program, command, remote_node,
1126 timeout])[node])
1127
1130 """Wrapper for RPC call 'set_watcher_pause'
1131
1132 Set watcher pause end
1133
1134 @note: This is a multi-node call with a timeout of 1m 0s
1135 @type node_list: list of string
1136 @param node_list: List of node names
1137
1138 """
1139 return (self._Call(_def, node_list, [until]))
1140
1143 """Wrapper for RPC call 'storage_execute'
1144
1145 Executes an operation on a storage unit
1146
1147 @note: This is a single-node call with a timeout of 15m 0s
1148 @type node: string
1149 @param node: Node name
1150
1151 """
1152 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1153
1156 """Wrapper for RPC call 'storage_list'
1157
1158 Get list of storage units
1159
1160 @note: This is a multi-node call with a timeout of 15m 0s
1161 @type node_list: list of string
1162 @param node_list: List of node names
1163
1164 """
1165 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1166
1169 """Wrapper for RPC call 'storage_modify'
1170
1171 Modify a storage unit
1172
1173 @note: This is a single-node call with a timeout of 15m 0s
1174 @type node: string
1175 @param node: Node name
1176
1177 """
1178 return (self._Call(_def, [node], [su_name, su_args, name,
1179 changes])[node])
1180
1183 """Wrapper for RPC call 'test_delay'
1184
1185 Sleep for a fixed time on given node(s)
1186
1187 @note: This is a multi-node call
1188 @type node_list: list of string
1189 @param node_list: List of node names
1190
1191 """
1192 return (self._Call(_def, node_list, [duration]))
1193
1195 """Wrapper for RPC call 'vg_list'
1196
1197 Gets the volume group list
1198
1199 @note: This is a multi-node call with a timeout of 1m 0s
1200 @type node_list: list of string
1201 @param node_list: List of node names
1202
1203 """
1204 return (self._Call(_def, node_list, []))
1205
1208 """Wrapper for RPC call 'x509_cert_create'
1209
1210 Creates a new X509 certificate for SSL/TLS
1211
1212 @note: This is a single-node call with a timeout of 15m 0s
1213 @type node: string
1214 @param node: Node name
1215 @param validity: Validity in seconds
1216
1217 """
1218 return (self._Call(_def, [node], [validity])[node])
1219
1222 """Wrapper for RPC call 'x509_cert_remove'
1223
1224 Removes a X509 certificate
1225
1226 @note: This is a single-node call with a timeout of 15m 0s
1227 @type node: string
1228 @param node: Node name
1229 @param name: Certificate name
1230
1231 """
1232 return (self._Call(_def, [node], [name])[node])
1233
1234
1236
1237
1238
1239 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly']
1240
1243 """Wrapper for RPC call 'node_verify_light'
1244
1245 Request verification of given parameters
1246
1247 @note: This is a multi-node call with a timeout of 15m 0s
1248 @type node_list: list of string
1249 @param node_list: List of node names
1250
1251 """
1252 return (self._Call(_def, node_list, [checkdict, cluster_name]))
1253
1255 """Wrapper for RPC call 'version'
1256
1257 Query node version
1258
1259 @note: This is a multi-node call with a timeout of 1m 0s
1260 @type node_list: list of string
1261 @param node_list: List of node names
1262
1263 """
1264 return (self._Call(_def, node_list, []))
1265
1266
1268
1269
1270
1271 _CALLS = rpc_defs.CALLS['RpcClientJobQueue']
1272
1274 """Wrapper for RPC call 'jobqueue_purge'
1275
1276 Purge job queue
1277
1278 @note: This is a single-node call with a timeout of 15m 0s
1279 @type node: string
1280 @param node: Node name
1281
1282 """
1283 return (self._Call(_def, [node], [])[node])
1284
1287 """Wrapper for RPC call 'jobqueue_rename'
1288
1289 Rename job queue file
1290
1291 @note: This is a multi-node call with a timeout of 1m 0s
1292 @type node_list: list of string
1293 @param node_list: List of node names
1294
1295 """
1296 return (self._Call(_def, node_list, [rename]))
1297
1300 """Wrapper for RPC call 'jobqueue_set_drain_flag'
1301
1302 Set job queue drain flag
1303
1304 @note: This is a multi-node call with a timeout of 1m 0s
1305 @type node_list: list of string
1306 @param node_list: List of node names
1307
1308 """
1309 return (self._Call(_def, node_list, [flag]))
1310
1313 """Wrapper for RPC call 'jobqueue_update'
1314
1315 Update job queue file
1316
1317 @note: This is a multi-node call with a timeout of 1m 0s
1318 @type node_list: list of string
1319 @param node_list: List of node names
1320
1321 """
1322 return (self._Call(_def, node_list, [file_name, content]))
1323