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
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
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
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
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
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
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
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
125
126
127
128 _CALLS = rpc_defs.CALLS['RpcClientConfig']
129
132 """Wrapper for RPC call 'upload_file'
133
134 Upload files
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
145 """Wrapper for RPC call 'upload_file_single'
146
147 Upload 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 @param file_name: The name of the file
153 @param content: The data to be uploaded
154 @param mode: The mode of the file or None
155 @param uid: The owner of the file
156 @param gid: The group of the file
157 @param atime: The file's last access time
158 @param mtime: The file's last modification time
159
160 """
161 return (self._Call(_def, node_list, [file_name, content, mode, uid,
162 gid, atime, mtime]))
163
166 """Wrapper for RPC call 'write_ssconf_files'
167
168 Write ssconf files
169
170 @note: This is a multi-node call with a timeout of 15m 0s
171 @type node_list: list of string
172 @param node_list: List of node names
173
174 """
175 return (self._Call(_def, node_list, [values]))
176
177
179
180
181
182 _CALLS = rpc_defs.CALLS['RpcClientDefault']
183
186 """Wrapper for RPC call 'accept_instance'
187
188 Prepare a node to accept an instance
189
190 @note: This is a single-node call with a timeout of 15m 0s
191 @type node: string
192 @param node: Node name
193 @param instance: Instance object
194 @param info: Result for the call_migration_info call
195 @param target: Target hostname (usually an IP address)
196
197 """
198 return (self._Call(_def, [node], [instance, info, target])[node])
199
202 """Wrapper for RPC call 'all_instances_info'
203
204 Returns information about all instances on the given nodes
205
206 @note: This is a multi-node call with a timeout of 1m 0s
207 @type node_list: list of string
208 @param node_list: List of node names
209 @param hypervisor_list: Hypervisors to query for instances
210 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
211
212 """
213 return (self._Call(_def, node_list, [hypervisor_list, all_hvparams]))
214
217 """Wrapper for RPC call 'bdev_sizes'
218
219 Gets the sizes of requested block devices present on a node
220
221 @note: This is a multi-node call with a timeout of 1m 0s
222 @type node_list: list of string
223 @param node_list: List of node names
224
225 """
226 return (self._Call(_def, node_list, [devices]))
227
230 """Wrapper for RPC call 'blockdev_addchildren'
231
232 Request adding a list of children to a (mirroring) device
233
234 @note: This is a single-node call with a timeout of 15m 0s
235 @type node: string
236 @param node: Node name
237
238 """
239 return (self._Call(_def, [node], [bdev, ndevs])[node])
240
243 """Wrapper for RPC call 'blockdev_assemble'
244
245 Request assembling of a given block device
246
247 @note: This is a single-node call with a timeout of 15m 0s
248 @type node: string
249 @param node: Node name
250
251 """
252 return (self._Call(_def, [node], [disk, instance, on_primary,
253 idx])[node])
254
257 """Wrapper for RPC call 'blockdev_close'
258
259 Closes the given block devices
260
261 @note: This is a single-node call with a timeout of 15m 0s
262 @type node: string
263 @param node: Node name
264
265 """
266 return (self._Call(_def, [node], [instance_name, disks])[node])
267
268 - def call_blockdev_create(self, node, bdev, size, owner, on_primary,
269 info, exclusive_storage, _def=_CALLS['blockdev_create']):
270 """Wrapper for RPC call 'blockdev_create'
271
272 Request creation of a given block device
273
274 @note: This is a single-node call with a timeout of 15m 0s
275 @type node: string
276 @param node: Node name
277
278 """
279 return (self._Call(_def, [node], [bdev, size, owner, on_primary, info,
280 exclusive_storage])[node])
281
284 """Wrapper for RPC call 'blockdev_find'
285
286 Request identification of a given block device
287
288 @note: This is a single-node call with a timeout of 15m 0s
289 @type node: string
290 @param node: Node name
291
292 """
293 return (self._Call(_def, [node], [disk])[node])
294
297 """Wrapper for RPC call 'blockdev_getdimensions'
298
299 Returns size and spindles of the given disks
300
301 @note: This is a single-node call with a timeout of 15m 0s
302 @type node: string
303 @param node: Node name
304
305 """
306 return (self._Call(_def, [node], [disks])[node])
307
310 """Wrapper for RPC call 'blockdev_getmirrorstatus'
311
312 Request status of a (mirroring) device
313
314 @note: This is a single-node call with a timeout of 15m 0s
315 @type node: string
316 @param node: Node name
317
318 """
319 return (self._Call(_def, [node], [disks])[node])
320
323 """Wrapper for RPC call 'blockdev_getmirrorstatus_multi'
324
325 Request status of (mirroring) devices from multiple nodes
326
327 @note: This is a multi-node call with a timeout of 15m 0s
328 @type node_list: list of string
329 @param node_list: List of node names
330
331 """
332 return (self._Call(_def, node_list, [node_disks]))
333
336 """Wrapper for RPC call 'blockdev_grow'
337
338 Request growing of the given block device by a given amount
339
340 @note: This is a single-node call with a timeout of 15m 0s
341 @type node: string
342 @param node: Node name
343
344 """
345 return (self._Call(_def, [node], [cf_bdev, amount, dryrun,
346 backingstore, es_flag])[node])
347
350 """Wrapper for RPC call 'blockdev_image'
351
352 Request to dump an image with given size onto a block device
353
354 @note: This is a single-node call with a timeout of 1h 0m 0s
355 @type node: string
356 @param node: Node name
357
358 """
359 return (self._Call(_def, [node], [bdev, image, size])[node])
360
363 """Wrapper for RPC call 'blockdev_pause_resume_sync'
364
365 Request a pause/resume of given block device
366
367 @note: This is a single-node call with a timeout of 15m 0s
368 @type node: string
369 @param node: Node name
370
371 """
372 return (self._Call(_def, [node], [disks, pause])[node])
373
376 """Wrapper for RPC call 'blockdev_remove'
377
378 Request removal of a given block device
379
380 @note: This is a single-node call with a timeout of 15m 0s
381 @type node: string
382 @param node: Node name
383
384 """
385 return (self._Call(_def, [node], [bdev])[node])
386
389 """Wrapper for RPC call 'blockdev_removechildren'
390
391 Request removing a list of children from a (mirroring) device
392
393 @note: This is a single-node call with a timeout of 15m 0s
394 @type node: string
395 @param node: Node name
396
397 """
398 return (self._Call(_def, [node], [bdev, ndevs])[node])
399
402 """Wrapper for RPC call 'blockdev_rename'
403
404 Request rename of the given block devices
405
406 @note: This is a single-node call with a timeout of 15m 0s
407 @type node: string
408 @param node: Node name
409
410 """
411 return (self._Call(_def, [node], [devlist])[node])
412
415 """Wrapper for RPC call 'blockdev_setinfo'
416
417 Sets metadata information on a given block device
418
419 @note: This is a single-node call with a timeout of 15m 0s
420 @type node: string
421 @param node: Node name
422
423 """
424 return (self._Call(_def, [node], [disk, info])[node])
425
428 """Wrapper for RPC call 'blockdev_shutdown'
429
430 Request shutdown of a given block device
431
432 @note: This is a single-node call with a timeout of 15m 0s
433 @type node: string
434 @param node: Node name
435
436 """
437 return (self._Call(_def, [node], [disk])[node])
438
441 """Wrapper for RPC call 'blockdev_snapshot'
442
443 Export a given disk to another node
444
445 @note: This is a single-node call with a timeout of 15m 0s
446 @type node: string
447 @param node: Node name
448
449 """
450 return (self._Call(_def, [node], [cf_bdev])[node])
451
454 """Wrapper for RPC call 'blockdev_wipe'
455
456 Request wipe at given offset with given size of a block device
457
458 @note: This is a single-node call with a timeout of 1h 0m 0s
459 @type node: string
460 @param node: Node name
461
462 """
463 return (self._Call(_def, [node], [bdev, offset, size])[node])
464
467 """Wrapper for RPC call 'bridges_exist'
468
469 Checks if a node has all the bridges given
470
471 @note: This is a single-node call with a timeout of 1m 0s
472 @type node: string
473 @param node: Node name
474 @param bridges_list: Bridges which must be present on remote node
475
476 """
477 return (self._Call(_def, [node], [bridges_list])[node])
478
481 """Wrapper for RPC call 'drbd_attach_net'
482
483 Connects the given DRBD devices
484
485 @note: This is a multi-node call with a timeout of 15m 0s
486 @type node_list: list of string
487 @param node_list: List of node names
488
489 """
490 return (self._Call(_def, node_list, [disks, instance_name,
491 multimaster]))
492
495 """Wrapper for RPC call 'drbd_disconnect_net'
496
497 Disconnects the network of the given drbd devices
498
499 @note: This is a multi-node call with a timeout of 15m 0s
500 @type node_list: list of string
501 @param node_list: List of node names
502
503 """
504 return (self._Call(_def, node_list, [disks]))
505
507 """Wrapper for RPC call 'drbd_helper'
508
509 Gets DRBD helper
510
511 @note: This is a multi-node call with a timeout of 1m 0s
512 @type node_list: list of string
513 @param node_list: List of node names
514
515 """
516 return (self._Call(_def, node_list, []))
517
520 """Wrapper for RPC call 'drbd_needs_activation'
521
522 Returns the drbd disks which need activation
523
524 @note: This is a single-node call with a timeout of 15m 0s
525 @type node: string
526 @param node: Node name
527
528 """
529 return (self._Call(_def, [node], [disks])[node])
530
533 """Wrapper for RPC call 'drbd_wait_sync'
534
535 Waits for the synchronization of drbd devices is complete
536
537 @note: This is a multi-node call with a timeout of 1h 0m 0s
538 @type node_list: list of string
539 @param node_list: List of node names
540
541 """
542 return (self._Call(_def, node_list, [disks]))
543
546 """Wrapper for RPC call 'etc_hosts_modify'
547
548 Modify hosts file with name
549
550 @note: This is a single-node call with a timeout of 15m 0s
551 @type node: string
552 @param node: Node name
553 @param mode: Mode to operate; currently L{constants.ETC_HOSTS_ADD} or
554 L{constants.ETC_HOSTS_REMOVE}
555 @param name: Hostname to be modified
556 @param ip: IP address (L{constants.ETC_HOSTS_ADD} only)
557
558 """
559 return (self._Call(_def, [node], [mode, name, ip])[node])
560
562 """Wrapper for RPC call 'export_info'
563
564 Queries the export information in a given path
565
566 @note: This is a single-node call with a timeout of 5m 0s
567 @type node: string
568 @param node: Node name
569
570 """
571 return (self._Call(_def, [node], [path])[node])
572
574 """Wrapper for RPC call 'export_list'
575
576 Gets the stored exports list
577
578 @note: This is a multi-node call with a timeout of 5m 0s
579 @type node_list: list of string
580 @param node_list: List of node names
581
582 """
583 return (self._Call(_def, node_list, []))
584
587 """Wrapper for RPC call 'export_remove'
588
589 Requests removal of a given export
590
591 @note: This is a single-node call with a timeout of 5m 0s
592 @type node: string
593 @param node: Node name
594
595 """
596 return (self._Call(_def, [node], [export])[node])
597
598 - def call_export_start(self, node, opts, host, port, instance,
599 component, source, _def=_CALLS['export_start']):
600 """Wrapper for RPC call 'export_start'
601
602 Starts an export daemon
603
604 @note: This is a single-node call with a timeout of 15m 0s
605 @type node: string
606 @param node: Node name
607 @param source: Export source
608
609 """
610 return (self._Call(_def, [node], [opts, host, port, instance,
611 component, source])[node])
612
615 """Wrapper for RPC call 'extstorage_diagnose'
616
617 Request a diagnose of ExtStorage Providers
618
619 @note: This is a multi-node call with a timeout of 5m 0s
620 @type node_list: list of string
621 @param node_list: List of node names
622
623 """
624 return (self._Call(_def, node_list, []))
625
628 """Wrapper for RPC call 'file_storage_dir_create'
629
630 Create the given file storage directory
631
632 @note: This is a single-node call with a timeout of 5m 0s
633 @type node: string
634 @param node: Node name
635 @param file_storage_dir: File storage directory
636
637 """
638 return (self._Call(_def, [node], [file_storage_dir])[node])
639
642 """Wrapper for RPC call 'file_storage_dir_remove'
643
644 Remove the given file storage directory
645
646 @note: This is a single-node call with a timeout of 5m 0s
647 @type node: string
648 @param node: Node name
649 @param file_storage_dir: File storage directory
650
651 """
652 return (self._Call(_def, [node], [file_storage_dir])[node])
653
656 """Wrapper for RPC call 'file_storage_dir_rename'
657
658 Rename file storage directory
659
660 @note: This is a single-node call with a timeout of 5m 0s
661 @type node: string
662 @param node: Node name
663 @param old_file_storage_dir: Old name
664 @param new_file_storage_dir: New name
665
666 """
667 return (self._Call(_def, [node], [old_file_storage_dir,
668 new_file_storage_dir])[node])
669
672 """Wrapper for RPC call 'finalize_export'
673
674 Request the completion of an export operation
675
676 @note: This is a single-node call with a timeout of 15m 0s
677 @type node: string
678 @param node: Node name
679
680 """
681 return (self._Call(_def, [node], [instance, snap_disks])[node])
682
685 """Wrapper for RPC call 'get_file_info'
686
687 Checks if a file exists and reports on it
688
689 @note: This is a single-node call with a timeout of 5m 0s
690 @type node: string
691 @param node: Node name
692
693 """
694 return (self._Call(_def, [node], [file_path])[node])
695
698 """Wrapper for RPC call 'get_watcher_pause'
699
700 Get watcher pause end
701
702 @note: This is a single-node call with a timeout of 1m 0s
703 @type node: string
704 @param node: Node name
705
706 """
707 return (self._Call(_def, [node], [])[node])
708
711 """Wrapper for RPC call 'hooks_runner'
712
713 Call the hooks runner
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
719 """
720 return (self._Call(_def, node_list, [hpath, phase, env]))
721
724 """Wrapper for RPC call 'hotplug_device'
725
726 Hoplug a device to a running instance
727
728 @note: This is a single-node call with a timeout of 15m 0s
729 @type node: string
730 @param node: Node name
731 @param instance: Instance object
732 @param action: Hotplug Action
733 @param dev_type: Device type
734 @param device: Device dict
735 @param extra: Extra info for device (dev_path for disk)
736 @param seq: Device seq
737
738 """
739 return (self._Call(_def, [node], [instance, action, dev_type, device,
740 extra, seq])[node])
741
744 """Wrapper for RPC call 'hotplug_supported'
745
746 Check if hotplug is supported
747
748 @note: This is a single-node call with a timeout of 15m 0s
749 @type node: string
750 @param node: Node name
751 @param instance: Instance object
752
753 """
754 return (self._Call(_def, [node], [instance])[node])
755
758 """Wrapper for RPC call 'hypervisor_validate_params'
759
760 Validate hypervisor params
761
762 @note: This is a multi-node call with a timeout of 15m 0s
763 @type node_list: list of string
764 @param node_list: List of node names
765 @param hvname: Hypervisor name
766 @param hvfull: Parameters to be validated
767
768 """
769 return (self._Call(_def, node_list, [hvname, hvfull]))
770
773 """Wrapper for RPC call 'iallocator_runner'
774
775 Call an iallocator on a remote node
776
777 @note: This is a single-node call with a timeout of 15m 0s
778 @type node: string
779 @param node: Node name
780 @param name: Iallocator name
781 @param idata: JSON-encoded input string
782 @param default_iallocator_params: Additional iallocator parameters
783
784 """
785 return (self._Call(_def, [node], [name, idata,
786 default_iallocator_params])[node])
787
789 """Wrapper for RPC call 'impexp_abort'
790
791 Aborts an import or export
792
793 @note: This is a single-node call with a timeout of 15m 0s
794 @type node: string
795 @param node: Node name
796 @param name: Import/export name
797
798 """
799 return (self._Call(_def, [node], [name])[node])
800
803 """Wrapper for RPC call 'impexp_cleanup'
804
805 Cleans up after an import or export
806
807 @note: This is a single-node call with a timeout of 15m 0s
808 @type node: string
809 @param node: Node name
810 @param name: Import/export name
811
812 """
813 return (self._Call(_def, [node], [name])[node])
814
817 """Wrapper for RPC call 'impexp_status'
818
819 Gets the status of an import or export
820
821 @note: This is a single-node call with a timeout of 5m 0s
822 @type node: string
823 @param node: Node name
824 @param names: Import/export names
825
826 """
827 return (self._Call(_def, [node], [names])[node])
828
831 """Wrapper for RPC call 'import_start'
832
833 Starts an import daemon
834
835 @note: This is a single-node call with a timeout of 15m 0s
836 @type node: string
837 @param node: Node name
838 @param dest: Import destination
839
840 """
841 return (self._Call(_def, [node], [opts, instance, component,
842 dest])[node])
843
846 """Wrapper for RPC call 'instance_balloon_memory'
847
848 Modify the amount of an instance's runtime memory
849
850 @note: This is a single-node call with a timeout of 15m 0s
851 @type node: string
852 @param node: Node name
853 @param instance: Instance object
854
855 """
856 return (self._Call(_def, [node], [instance, memory])[node])
857
860 """Wrapper for RPC call 'instance_finalize_migration_dst'
861
862 Finalize any target-node migration specific operation
863
864 @note: This is a single-node call with a timeout of 15m 0s
865 @type node: string
866 @param node: Node name
867 @param instance: Instance object
868 @param info: Result for the call_migration_info call
869 @param success: Whether the migration was a success or failure
870
871 """
872 return (self._Call(_def, [node], [instance, info, success])[node])
873
876 """Wrapper for RPC call 'instance_finalize_migration_src'
877
878 Finalize the instance migration on the source node
879
880 @note: This is a single-node call with a timeout of 1h 0m 0s
881 @type node: string
882 @param node: Node name
883 @param instance: Instance object
884 @param success: Whether the migration succeeded or not
885 @param live: Whether the user requested a live migration or not
886
887 """
888 return (self._Call(_def, [node], [instance, success, live])[node])
889
892 """Wrapper for RPC call 'instance_get_migration_status'
893
894 Report migration status
895
896 @note: This is a single-node call with a timeout of 1h 0m 0s
897 @type node: string
898 @param node: Node name
899 @param instance: Instance object
900
901 """
902 return (self._Call(_def, [node], [instance])[node])
903
906 """Wrapper for RPC call 'instance_info'
907
908 Returns information about a single instance
909
910 @note: This is a single-node call with a timeout of 1m 0s
911 @type node: string
912 @param node: Node name
913 @param instance: Instance name
914 @param hname: Hypervisor type
915 @param hvparams: Hypervisor parameters
916
917 """
918 return (self._Call(_def, [node], [instance, hname, hvparams])[node])
919
922 """Wrapper for RPC call 'instance_list'
923
924 Returns the list of running instances on the given nodes
925
926 @note: This is a multi-node call with a timeout of 1m 0s
927 @type node_list: list of string
928 @param node_list: List of node names
929 @param hypervisor_list: Hypervisors to query for instances
930 @param hvparams: Hvparams of all hypervisors
931
932 """
933 return (self._Call(_def, node_list, [hypervisor_list, hvparams]))
934
948
951 """Wrapper for RPC call 'instance_migratable'
952
953 Checks whether the given instance can be migrated
954
955 @note: This is a single-node call with a timeout of 15m 0s
956 @type node: string
957 @param node: Node name
958 @param instance: Instance object
959
960 """
961 return (self._Call(_def, [node], [instance])[node])
962
965 """Wrapper for RPC call 'instance_migrate'
966
967 Migrate an instance
968
969 @note: This is a single-node call with a timeout of 1h 0m 0s
970 @type node: string
971 @param node: Node name
972 @param cluster_name: Cluster name
973 @param instance: Instance object
974 @param target: Target node name
975 @param live: Whether the migration should be done live or not
976
977 """
978 return (self._Call(_def, [node], [cluster_name, instance, target,
979 live])[node])
980
983 """Wrapper for RPC call 'instance_os_add'
984
985 Installs an operative system onto an instance
986
987 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
988 @type node: string
989 @param node: Node name
990 @param instance_osp: Tuple: (target instance, temporary OS parameters
991 overriding configuration)
992 @param reinstall: Whether the instance is being reinstalled
993 @param debug: Debug level for the OS install script to use
994
995 """
996 return (self._Call(_def, [node], [instance_osp, reinstall,
997 debug])[node])
998
1001 """Wrapper for RPC call 'instance_reboot'
1002
1003 Returns the list of running instances on the given nodes
1004
1005 @note: This is a single-node call with a timeout of 15m 0s
1006 @type node: string
1007 @param node: Node name
1008 @param inst: Instance object
1009 @param reason: The reason for the reboot
1010
1011 """
1012 return (self._Call(_def, [node], [inst, reboot_type, shutdown_timeout,
1013 reason])[node])
1014
1017 """Wrapper for RPC call 'instance_run_rename'
1018
1019 Run the OS rename script for an instance
1020
1021 @note: This is a single-node call with a timeout of 1h 0m 0s
1022 @type node: string
1023 @param node: Node name
1024 @param instance: Instance object
1025
1026 """
1027 return (self._Call(_def, [node], [instance, old_name, debug])[node])
1028
1031 """Wrapper for RPC call 'instance_shutdown'
1032
1033 Stops an instance
1034
1035 @note: This is a single-node call with a timeout of 15m 0s
1036 @type node: string
1037 @param node: Node name
1038 @param instance: Instance object
1039 @param reason: The reason for the shutdown
1040
1041 """
1042 return (self._Call(_def, [node], [instance, timeout, reason])[node])
1043
1046 """Wrapper for RPC call 'instance_start'
1047
1048 Starts an instance
1049
1050 @note: This is a single-node call with a timeout of 15m 0s
1051 @type node: string
1052 @param node: Node name
1053 @param reason: The reason for the startup
1054
1055 """
1056 return (self._Call(_def, [node], [instance_hvp_bep, startup_paused,
1057 reason])[node])
1058
1060 """Wrapper for RPC call 'lv_list'
1061
1062 Gets the logical volumes present in a given volume group
1063
1064 @note: This is a multi-node call with a timeout of 1m 0s
1065 @type node_list: list of string
1066 @param node_list: List of node names
1067
1068 """
1069 return (self._Call(_def, node_list, [vg_name]))
1070
1073 """Wrapper for RPC call 'migration_info'
1074
1075 Gather the information necessary to prepare an instance migration
1076
1077 @note: This is a single-node call with a timeout of 15m 0s
1078 @type node: string
1079 @param node: Node name
1080 @param instance: Instance object
1081
1082 """
1083 return (self._Call(_def, [node], [instance])[node])
1084
1099
1102 """Wrapper for RPC call 'node_crypto_tokens'
1103
1104 Handle crypto tokens of the node.
1105
1106 @note: This is a single-node call with a timeout of 1h 0m 0s
1107 @type node: string
1108 @param node: Node name
1109 @param token_request: List of tuples of requested crypto token types,
1110 actions
1111
1112 """
1113 return (self._Call(_def, [node], [token_request])[node])
1114
1117 """Wrapper for RPC call 'node_demote_from_mc'
1118
1119 Demote a node from the master candidate role
1120
1121 @note: This is a single-node call with a timeout of 5m 0s
1122 @type node: string
1123 @param node: Node name
1124
1125 """
1126 return (self._Call(_def, [node], [])[node])
1127
1130 """Wrapper for RPC call 'node_ensure_daemon'
1131
1132 Ensure daemon is running on the node.
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 @param daemon: Daemon name
1138 @param run: Whether the daemon should be running or stopped
1139
1140 """
1141 return (self._Call(_def, node_list, [daemon, run]))
1142
1145 """Wrapper for RPC call 'node_has_ip_address'
1146
1147 Checks if a node has the given IP address
1148
1149 @note: This is a single-node call with a timeout of 5m 0s
1150 @type node: string
1151 @param node: Node name
1152 @param address: IP address
1153
1154 """
1155 return (self._Call(_def, [node], [address])[node])
1156
1159 """Wrapper for RPC call 'node_info'
1160
1161 Return node information
1162
1163 @note: This is a multi-node call with a timeout of 1m 0s
1164 @type node_list: list of string
1165 @param node_list: List of node names
1166 @param storage_units: List of tuples '<storage_type>,<key>,[<param>]'
1167 to ask for disk space information; the parameter list varies
1168 depending on the storage_type
1169 @param hv_specs: List of hypervisor specification (name, hvparams) to
1170 ask for node information
1171
1172 """
1173 return (self._Call(_def, node_list, [storage_units, hv_specs]))
1174
1177 """Wrapper for RPC call 'node_powercycle'
1178
1179 Tries to powercycle a node
1180
1181 @note: This is a single-node call with a timeout of 15m 0s
1182 @type node: string
1183 @param node: Node name
1184 @param hypervisor: Hypervisor type
1185 @param hvparams: Hypervisor parameters
1186
1187 """
1188 return (self._Call(_def, [node], [hypervisor, hvparams])[node])
1189
1190 - def call_node_verify(self, node_list, checkdict, cluster_name,
1191 all_hvparams, node_groups, groups_cfg, _def=_CALLS['node_verify']):
1192 """Wrapper for RPC call 'node_verify'
1193
1194 Request verification of given parameters
1195
1196 @note: This is a multi-node call with a timeout of 15m 0s
1197 @type node_list: list of string
1198 @param node_list: List of node names
1199 @param checkdict: What to verify
1200 @param cluster_name: Cluster name
1201 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
1202 @param node_groups: node names mapped to their group uuids
1203 @param groups_cfg: a dictionary mapping group uuids to their
1204 configuration
1205
1206 """
1207 return (self._Call(_def, node_list, [checkdict, cluster_name,
1208 all_hvparams, node_groups, groups_cfg]))
1209
1211 """Wrapper for RPC call 'node_volumes'
1212
1213 Gets all volumes on node(s)
1214
1215 @note: This is a multi-node call with a timeout of 5m 0s
1216 @type node_list: list of string
1217 @param node_list: List of node names
1218
1219 """
1220 return (self._Call(_def, node_list, []))
1221
1223 """Wrapper for RPC call 'os_diagnose'
1224
1225 Request a diagnose of OS definitions
1226
1227 @note: This is a multi-node call with a timeout of 5m 0s
1228 @type node_list: list of string
1229 @param node_list: List of node names
1230
1231 """
1232 return (self._Call(_def, node_list, []))
1233
1236 """Wrapper for RPC call 'os_export'
1237
1238 Export an OS for a given instance
1239
1240 @note: This is a single-node call with a timeout of 5m 0s
1241 @type node: string
1242 @param node: Node name
1243
1244 """
1245 return (self._Call(_def, [node], [instance, override_env])[node])
1246
1247 - def call_os_validate(self, node_list, required, name, checks, params,
1248 force_variant, _def=_CALLS['os_validate']):
1249 """Wrapper for RPC call 'os_validate'
1250
1251 Run a validation routine for a given OS
1252
1253 @note: This is a multi-node call with a timeout of 5m 0s
1254 @type node_list: list of string
1255 @param node_list: List of node names
1256
1257 """
1258 return (self._Call(_def, node_list, [required, name, checks, params,
1259 force_variant]))
1260
1263 """Wrapper for RPC call 'restricted_command'
1264
1265 Runs restricted command
1266
1267 @note: This is a multi-node call with a timeout of 1h 0m 0s
1268 @type node_list: list of string
1269 @param node_list: List of node names
1270 @param cmd: Command name
1271
1272 """
1273 return (self._Call(_def, node_list, [cmd]))
1274
1275 - def call_run_oob(self, node, oob_program, command, remote_node,
1276 timeout, _def=_CALLS['run_oob']):
1277 """Wrapper for RPC call 'run_oob'
1278
1279 Runs out-of-band command
1280
1281 @note: This is a single-node call with a timeout of 15m 0s
1282 @type node: string
1283 @param node: Node name
1284
1285 """
1286 return (self._Call(_def, [node], [oob_program, command, remote_node,
1287 timeout])[node])
1288
1291 """Wrapper for RPC call 'set_watcher_pause'
1292
1293 Set watcher pause end
1294
1295 @note: This is a multi-node call with a timeout of 1m 0s
1296 @type node_list: list of string
1297 @param node_list: List of node names
1298
1299 """
1300 return (self._Call(_def, node_list, [until]))
1301
1304 """Wrapper for RPC call 'storage_execute'
1305
1306 Executes an operation on a storage unit
1307
1308 @note: This is a single-node call with a timeout of 15m 0s
1309 @type node: string
1310 @param node: Node name
1311
1312 """
1313 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1314
1317 """Wrapper for RPC call 'storage_list'
1318
1319 Get list of storage units
1320
1321 @note: This is a multi-node call with a timeout of 15m 0s
1322 @type node_list: list of string
1323 @param node_list: List of node names
1324
1325 """
1326 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1327
1330 """Wrapper for RPC call 'storage_modify'
1331
1332 Modify a storage unit
1333
1334 @note: This is a single-node call with a timeout of 15m 0s
1335 @type node: string
1336 @param node: Node name
1337
1338 """
1339 return (self._Call(_def, [node], [su_name, su_args, name,
1340 changes])[node])
1341
1344 """Wrapper for RPC call 'test_delay'
1345
1346 Sleep for a fixed time on given node(s)
1347
1348 @note: This is a multi-node call
1349 @type node_list: list of string
1350 @param node_list: List of node names
1351
1352 """
1353 return (self._Call(_def, node_list, [duration]))
1354
1356 """Wrapper for RPC call 'vg_list'
1357
1358 Gets the volume group list
1359
1360 @note: This is a multi-node call with a timeout of 1m 0s
1361 @type node_list: list of string
1362 @param node_list: List of node names
1363
1364 """
1365 return (self._Call(_def, node_list, []))
1366
1369 """Wrapper for RPC call 'x509_cert_create'
1370
1371 Creates a new X509 certificate for SSL/TLS
1372
1373 @note: This is a single-node call with a timeout of 15m 0s
1374 @type node: string
1375 @param node: Node name
1376 @param validity: Validity in seconds
1377
1378 """
1379 return (self._Call(_def, [node], [validity])[node])
1380
1383 """Wrapper for RPC call 'x509_cert_remove'
1384
1385 Removes a X509 certificate
1386
1387 @note: This is a single-node call with a timeout of 15m 0s
1388 @type node: string
1389 @param node: Node name
1390 @param name: Certificate name
1391
1392 """
1393 return (self._Call(_def, [node], [name])[node])
1394
1395
1397
1398
1399
1400 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly']
1401
1402 - def call_node_verify_light(self, node_list, checkdict, cluster_name,
1403 hvparams, node_groups, groups_cfg,
1404 _def=_CALLS['node_verify_light']):
1405 """Wrapper for RPC call 'node_verify_light'
1406
1407 Request verification of given parameters
1408
1409 @note: This is a multi-node call with a timeout of 15m 0s
1410 @type node_list: list of string
1411 @param node_list: List of node names
1412 @param checkdict: What to verify
1413 @param cluster_name: Cluster name
1414 @param hvparams: Dictionary mapping hypervisor names to hvparams
1415 @param node_groups: node names mapped to their group uuids
1416 @param groups_cfg: a dictionary mapping group uuids to their
1417 configuration
1418
1419 """
1420 return (self._Call(_def, node_list, [checkdict, cluster_name,
1421 hvparams, node_groups, groups_cfg]))
1422
1424 """Wrapper for RPC call 'version'
1425
1426 Query node version
1427
1428 @note: This is a multi-node call with a timeout of 1m 0s
1429 @type node_list: list of string
1430 @param node_list: List of node names
1431
1432 """
1433 return (self._Call(_def, node_list, []))
1434
1435
1437
1438
1439
1440 _CALLS = rpc_defs.CALLS['RpcClientJobQueue']
1441
1443 """Wrapper for RPC call 'jobqueue_purge'
1444
1445 Purge job queue
1446
1447 @note: This is a single-node call with a timeout of 15m 0s
1448 @type node: string
1449 @param node: Node name
1450
1451 """
1452 return (self._Call(_def, [node], [])[node])
1453
1456 """Wrapper for RPC call 'jobqueue_rename'
1457
1458 Rename job queue file
1459
1460 @note: This is a multi-node call with a timeout of 1m 0s
1461 @type node_list: list of string
1462 @param node_list: List of node names
1463
1464 """
1465 return (self._Call(_def, node_list, [rename]))
1466
1469 """Wrapper for RPC call 'jobqueue_set_drain_flag'
1470
1471 Set job queue drain flag
1472
1473 @note: This is a multi-node call with a timeout of 1m 0s
1474 @type node_list: list of string
1475 @param node_list: List of node names
1476
1477 """
1478 return (self._Call(_def, node_list, [flag]))
1479
1482 """Wrapper for RPC call 'jobqueue_update'
1483
1484 Update job queue file
1485
1486 @note: This is a multi-node call with a timeout of 1m 0s
1487 @type node_list: list of string
1488 @param node_list: List of node names
1489
1490 """
1491 return (self._Call(_def, node_list, [file_name, content]))
1492