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 a file
135
136 @note: This is a multi-node call with a timeout of 15m 0s
137 @type node_list: list of string
138 @param node_list: List of node names
139
140 """
141 return (self._Call(_def, node_list, [file_name]))
142
145 """Wrapper for RPC call 'write_ssconf_files'
146
147 Write ssconf files
148
149 @note: This is a multi-node call with a timeout of 15m 0s
150 @type node_list: list of string
151 @param node_list: List of node names
152
153 """
154 return (self._Call(_def, node_list, [values]))
155
156
158
159
160
161 _CALLS = rpc_defs.CALLS['RpcClientDefault']
162
165 """Wrapper for RPC call 'accept_instance'
166
167 Prepare a node to accept an instance
168
169 @note: This is a single-node call with a timeout of 15m 0s
170 @type node: string
171 @param node: Node name
172 @param instance: Instance object
173 @param info: Result for the call_migration_info call
174 @param target: Target hostname (usually an IP address)
175
176 """
177 return (self._Call(_def, [node], [instance, info, target])[node])
178
181 """Wrapper for RPC call 'all_instances_info'
182
183 Returns information about all instances on the given nodes
184
185 @note: This is a multi-node call with a timeout of 1m 0s
186 @type node_list: list of string
187 @param node_list: List of node names
188 @param hypervisor_list: Hypervisors to query for instances
189 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
190
191 """
192 return (self._Call(_def, node_list, [hypervisor_list, all_hvparams]))
193
196 """Wrapper for RPC call 'bdev_sizes'
197
198 Gets the sizes of requested block devices present on a node
199
200 @note: This is a multi-node call with a timeout of 1m 0s
201 @type node_list: list of string
202 @param node_list: List of node names
203
204 """
205 return (self._Call(_def, node_list, [devices]))
206
209 """Wrapper for RPC call 'blockdev_addchildren'
210
211 Request adding a list of children to a (mirroring) device
212
213 @note: This is a single-node call with a timeout of 15m 0s
214 @type node: string
215 @param node: Node name
216
217 """
218 return (self._Call(_def, [node], [bdev, ndevs])[node])
219
222 """Wrapper for RPC call 'blockdev_assemble'
223
224 Request assembling of a given block device
225
226 @note: This is a single-node call with a timeout of 15m 0s
227 @type node: string
228 @param node: Node name
229
230 """
231 return (self._Call(_def, [node], [disk, instance, on_primary,
232 idx])[node])
233
236 """Wrapper for RPC call 'blockdev_close'
237
238 Closes the given block devices
239
240 @note: This is a single-node call with a timeout of 15m 0s
241 @type node: string
242 @param node: Node name
243
244 """
245 return (self._Call(_def, [node], [instance_name, disks])[node])
246
247 - def call_blockdev_create(self, node, bdev, size, owner, on_primary,
248 info, exclusive_storage, _def=_CALLS['blockdev_create']):
249 """Wrapper for RPC call 'blockdev_create'
250
251 Request creation of a given block device
252
253 @note: This is a single-node call with a timeout of 15m 0s
254 @type node: string
255 @param node: Node name
256
257 """
258 return (self._Call(_def, [node], [bdev, size, owner, on_primary, info,
259 exclusive_storage])[node])
260
263 """Wrapper for RPC call 'blockdev_find'
264
265 Request identification of a given block device
266
267 @note: This is a single-node call with a timeout of 15m 0s
268 @type node: string
269 @param node: Node name
270
271 """
272 return (self._Call(_def, [node], [disk])[node])
273
276 """Wrapper for RPC call 'blockdev_getdimensions'
277
278 Returns size and spindles of the given disks
279
280 @note: This is a single-node call with a timeout of 15m 0s
281 @type node: string
282 @param node: Node name
283
284 """
285 return (self._Call(_def, [node], [disks])[node])
286
289 """Wrapper for RPC call 'blockdev_getmirrorstatus'
290
291 Request status of a (mirroring) device
292
293 @note: This is a single-node call with a timeout of 15m 0s
294 @type node: string
295 @param node: Node name
296
297 """
298 return (self._Call(_def, [node], [disks])[node])
299
302 """Wrapper for RPC call 'blockdev_getmirrorstatus_multi'
303
304 Request status of (mirroring) devices from multiple nodes
305
306 @note: This is a multi-node call with a timeout of 15m 0s
307 @type node_list: list of string
308 @param node_list: List of node names
309
310 """
311 return (self._Call(_def, node_list, [node_disks]))
312
315 """Wrapper for RPC call 'blockdev_grow'
316
317 Request growing of the given block device by a given amount
318
319 @note: This is a single-node call with a timeout of 15m 0s
320 @type node: string
321 @param node: Node name
322
323 """
324 return (self._Call(_def, [node], [cf_bdev, amount, dryrun,
325 backingstore, es_flag])[node])
326
329 """Wrapper for RPC call 'blockdev_pause_resume_sync'
330
331 Request a pause/resume of given block device
332
333 @note: This is a single-node call with a timeout of 15m 0s
334 @type node: string
335 @param node: Node name
336
337 """
338 return (self._Call(_def, [node], [disks, pause])[node])
339
342 """Wrapper for RPC call 'blockdev_remove'
343
344 Request removal of a given block device
345
346 @note: This is a single-node call with a timeout of 15m 0s
347 @type node: string
348 @param node: Node name
349
350 """
351 return (self._Call(_def, [node], [bdev])[node])
352
355 """Wrapper for RPC call 'blockdev_removechildren'
356
357 Request removing a list of children from a (mirroring) device
358
359 @note: This is a single-node call with a timeout of 15m 0s
360 @type node: string
361 @param node: Node name
362
363 """
364 return (self._Call(_def, [node], [bdev, ndevs])[node])
365
368 """Wrapper for RPC call 'blockdev_rename'
369
370 Request rename of the given block devices
371
372 @note: This is a single-node call with a timeout of 15m 0s
373 @type node: string
374 @param node: Node name
375
376 """
377 return (self._Call(_def, [node], [devlist])[node])
378
381 """Wrapper for RPC call 'blockdev_setinfo'
382
383 Sets metadata information on a given block device
384
385 @note: This is a single-node call with a timeout of 15m 0s
386 @type node: string
387 @param node: Node name
388
389 """
390 return (self._Call(_def, [node], [disk, info])[node])
391
394 """Wrapper for RPC call 'blockdev_shutdown'
395
396 Request shutdown of a given block device
397
398 @note: This is a single-node call with a timeout of 15m 0s
399 @type node: string
400 @param node: Node name
401
402 """
403 return (self._Call(_def, [node], [disk])[node])
404
407 """Wrapper for RPC call 'blockdev_snapshot'
408
409 Export a given disk to another node
410
411 @note: This is a single-node call with a timeout of 15m 0s
412 @type node: string
413 @param node: Node name
414
415 """
416 return (self._Call(_def, [node], [cf_bdev])[node])
417
420 """Wrapper for RPC call 'blockdev_wipe'
421
422 Request wipe at given offset with given size of a block device
423
424 @note: This is a single-node call with a timeout of 1h 0m 0s
425 @type node: string
426 @param node: Node name
427
428 """
429 return (self._Call(_def, [node], [bdev, offset, size])[node])
430
433 """Wrapper for RPC call 'bridges_exist'
434
435 Checks if a node has all the bridges given
436
437 @note: This is a single-node call with a timeout of 1m 0s
438 @type node: string
439 @param node: Node name
440 @param bridges_list: Bridges which must be present on remote node
441
442 """
443 return (self._Call(_def, [node], [bridges_list])[node])
444
447 """Wrapper for RPC call 'drbd_attach_net'
448
449 Connects the given DRBD devices
450
451 @note: This is a multi-node call with a timeout of 15m 0s
452 @type node_list: list of string
453 @param node_list: List of node names
454
455 """
456 return (self._Call(_def, node_list, [disks, instance_name,
457 multimaster]))
458
461 """Wrapper for RPC call 'drbd_disconnect_net'
462
463 Disconnects the network of the given drbd devices
464
465 @note: This is a multi-node call with a timeout of 15m 0s
466 @type node_list: list of string
467 @param node_list: List of node names
468
469 """
470 return (self._Call(_def, node_list, [disks]))
471
473 """Wrapper for RPC call 'drbd_helper'
474
475 Gets DRBD helper
476
477 @note: This is a multi-node call with a timeout of 1m 0s
478 @type node_list: list of string
479 @param node_list: List of node names
480
481 """
482 return (self._Call(_def, node_list, []))
483
486 """Wrapper for RPC call 'drbd_needs_activation'
487
488 Returns the drbd disks which need activation
489
490 @note: This is a single-node call with a timeout of 15m 0s
491 @type node: string
492 @param node: Node name
493
494 """
495 return (self._Call(_def, [node], [disks])[node])
496
499 """Wrapper for RPC call 'drbd_wait_sync'
500
501 Waits for the synchronization of drbd devices is complete
502
503 @note: This is a multi-node call with a timeout of 1h 0m 0s
504 @type node_list: list of string
505 @param node_list: List of node names
506
507 """
508 return (self._Call(_def, node_list, [disks]))
509
512 """Wrapper for RPC call 'etc_hosts_modify'
513
514 Modify hosts file with name
515
516 @note: This is a single-node call with a timeout of 15m 0s
517 @type node: string
518 @param node: Node name
519 @param mode: Mode to operate; currently L{constants.ETC_HOSTS_ADD} or
520 L{constants.ETC_HOSTS_REMOVE}
521 @param name: Hostname to be modified
522 @param ip: IP address (L{constants.ETC_HOSTS_ADD} only)
523
524 """
525 return (self._Call(_def, [node], [mode, name, ip])[node])
526
528 """Wrapper for RPC call 'export_info'
529
530 Queries the export information in a given path
531
532 @note: This is a single-node call with a timeout of 5m 0s
533 @type node: string
534 @param node: Node name
535
536 """
537 return (self._Call(_def, [node], [path])[node])
538
540 """Wrapper for RPC call 'export_list'
541
542 Gets the stored exports list
543
544 @note: This is a multi-node call with a timeout of 5m 0s
545 @type node_list: list of string
546 @param node_list: List of node names
547
548 """
549 return (self._Call(_def, node_list, []))
550
553 """Wrapper for RPC call 'export_remove'
554
555 Requests removal of a given export
556
557 @note: This is a single-node call with a timeout of 5m 0s
558 @type node: string
559 @param node: Node name
560
561 """
562 return (self._Call(_def, [node], [export])[node])
563
564 - def call_export_start(self, node, opts, host, port, instance,
565 component, source, _def=_CALLS['export_start']):
566 """Wrapper for RPC call 'export_start'
567
568 Starts an export daemon
569
570 @note: This is a single-node call with a timeout of 15m 0s
571 @type node: string
572 @param node: Node name
573 @param source: Export source
574
575 """
576 return (self._Call(_def, [node], [opts, host, port, instance,
577 component, source])[node])
578
581 """Wrapper for RPC call 'extstorage_diagnose'
582
583 Request a diagnose of ExtStorage Providers
584
585 @note: This is a multi-node call with a timeout of 5m 0s
586 @type node_list: list of string
587 @param node_list: List of node names
588
589 """
590 return (self._Call(_def, node_list, []))
591
594 """Wrapper for RPC call 'file_storage_dir_create'
595
596 Create the given file storage directory
597
598 @note: This is a single-node call with a timeout of 5m 0s
599 @type node: string
600 @param node: Node name
601 @param file_storage_dir: File storage directory
602
603 """
604 return (self._Call(_def, [node], [file_storage_dir])[node])
605
608 """Wrapper for RPC call 'file_storage_dir_remove'
609
610 Remove the given file storage directory
611
612 @note: This is a single-node call with a timeout of 5m 0s
613 @type node: string
614 @param node: Node name
615 @param file_storage_dir: File storage directory
616
617 """
618 return (self._Call(_def, [node], [file_storage_dir])[node])
619
622 """Wrapper for RPC call 'file_storage_dir_rename'
623
624 Rename file storage directory
625
626 @note: This is a single-node call with a timeout of 5m 0s
627 @type node: string
628 @param node: Node name
629 @param old_file_storage_dir: Old name
630 @param new_file_storage_dir: New name
631
632 """
633 return (self._Call(_def, [node], [old_file_storage_dir,
634 new_file_storage_dir])[node])
635
638 """Wrapper for RPC call 'finalize_export'
639
640 Request the completion of an export operation
641
642 @note: This is a single-node call with a timeout of 15m 0s
643 @type node: string
644 @param node: Node name
645
646 """
647 return (self._Call(_def, [node], [instance, snap_disks])[node])
648
651 """Wrapper for RPC call 'get_watcher_pause'
652
653 Get watcher pause end
654
655 @note: This is a single-node call with a timeout of 1m 0s
656 @type node: string
657 @param node: Node name
658
659 """
660 return (self._Call(_def, [node], [])[node])
661
664 """Wrapper for RPC call 'hooks_runner'
665
666 Call the hooks runner
667
668 @note: This is a multi-node call with a timeout of 15m 0s
669 @type node_list: list of string
670 @param node_list: List of node names
671
672 """
673 return (self._Call(_def, node_list, [hpath, phase, env]))
674
677 """Wrapper for RPC call 'hotplug_device'
678
679 Hoplug a device to a running instance
680
681 @note: This is a single-node call with a timeout of 15m 0s
682 @type node: string
683 @param node: Node name
684 @param instance: Instance object
685 @param action: Hotplug Action
686 @param dev_type: Device type
687 @param device: Device dict
688 @param extra: Extra info for device (dev_path for disk)
689 @param seq: Device seq
690
691 """
692 return (self._Call(_def, [node], [instance, action, dev_type, device,
693 extra, seq])[node])
694
697 """Wrapper for RPC call 'hotplug_supported'
698
699 Check if hotplug is supported
700
701 @note: This is a single-node call with a timeout of 15m 0s
702 @type node: string
703 @param node: Node name
704 @param instance: Instance object
705
706 """
707 return (self._Call(_def, [node], [instance])[node])
708
711 """Wrapper for RPC call 'hypervisor_validate_params'
712
713 Validate hypervisor params
714
715 @note: This is a multi-node call with a timeout of 15m 0s
716 @type node_list: list of string
717 @param node_list: List of node names
718 @param hvname: Hypervisor name
719 @param hvfull: Parameters to be validated
720
721 """
722 return (self._Call(_def, node_list, [hvname, hvfull]))
723
726 """Wrapper for RPC call 'iallocator_runner'
727
728 Call an iallocator on a remote node
729
730 @note: This is a single-node call with a timeout of 15m 0s
731 @type node: string
732 @param node: Node name
733 @param name: Iallocator name
734 @param idata: JSON-encoded input string
735 @param default_iallocator_params: Additional iallocator parameters
736
737 """
738 return (self._Call(_def, [node], [name, idata,
739 default_iallocator_params])[node])
740
742 """Wrapper for RPC call 'impexp_abort'
743
744 Aborts an import or export
745
746 @note: This is a single-node call with a timeout of 15m 0s
747 @type node: string
748 @param node: Node name
749 @param name: Import/export name
750
751 """
752 return (self._Call(_def, [node], [name])[node])
753
756 """Wrapper for RPC call 'impexp_cleanup'
757
758 Cleans up after an import or export
759
760 @note: This is a single-node call with a timeout of 15m 0s
761 @type node: string
762 @param node: Node name
763 @param name: Import/export name
764
765 """
766 return (self._Call(_def, [node], [name])[node])
767
770 """Wrapper for RPC call 'impexp_status'
771
772 Gets the status of an import or export
773
774 @note: This is a single-node call with a timeout of 5m 0s
775 @type node: string
776 @param node: Node name
777 @param names: Import/export names
778
779 """
780 return (self._Call(_def, [node], [names])[node])
781
784 """Wrapper for RPC call 'import_start'
785
786 Starts an import daemon
787
788 @note: This is a single-node call with a timeout of 15m 0s
789 @type node: string
790 @param node: Node name
791 @param dest: Import destination
792
793 """
794 return (self._Call(_def, [node], [opts, instance, component,
795 dest])[node])
796
799 """Wrapper for RPC call 'instance_balloon_memory'
800
801 Modify the amount of an instance's runtime memory
802
803 @note: This is a single-node call with a timeout of 15m 0s
804 @type node: string
805 @param node: Node name
806 @param instance: Instance object
807
808 """
809 return (self._Call(_def, [node], [instance, memory])[node])
810
813 """Wrapper for RPC call 'instance_finalize_migration_dst'
814
815 Finalize any target-node migration specific operation
816
817 @note: This is a single-node call with a timeout of 15m 0s
818 @type node: string
819 @param node: Node name
820 @param instance: Instance object
821 @param info: Result for the call_migration_info call
822 @param success: Whether the migration was a success or failure
823
824 """
825 return (self._Call(_def, [node], [instance, info, success])[node])
826
829 """Wrapper for RPC call 'instance_finalize_migration_src'
830
831 Finalize the instance migration on the source node
832
833 @note: This is a single-node call with a timeout of 1h 0m 0s
834 @type node: string
835 @param node: Node name
836 @param instance: Instance object
837 @param success: Whether the migration succeeded or not
838 @param live: Whether the user requested a live migration or not
839
840 """
841 return (self._Call(_def, [node], [instance, success, live])[node])
842
845 """Wrapper for RPC call 'instance_get_migration_status'
846
847 Report migration status
848
849 @note: This is a single-node call with a timeout of 1h 0m 0s
850 @type node: string
851 @param node: Node name
852 @param instance: Instance object
853
854 """
855 return (self._Call(_def, [node], [instance])[node])
856
859 """Wrapper for RPC call 'instance_info'
860
861 Returns information about a single instance
862
863 @note: This is a single-node call with a timeout of 1m 0s
864 @type node: string
865 @param node: Node name
866 @param instance: Instance name
867 @param hname: Hypervisor type
868 @param hvparams: Hypervisor parameters
869
870 """
871 return (self._Call(_def, [node], [instance, hname, hvparams])[node])
872
875 """Wrapper for RPC call 'instance_list'
876
877 Returns the list of running instances on the given nodes
878
879 @note: This is a multi-node call with a timeout of 1m 0s
880 @type node_list: list of string
881 @param node_list: List of node names
882 @param hypervisor_list: Hypervisors to query for instances
883 @param hvparams: Hvparams of all hypervisors
884
885 """
886 return (self._Call(_def, node_list, [hypervisor_list, hvparams]))
887
890 """Wrapper for RPC call 'instance_migratable'
891
892 Checks whether the given instance can be migrated
893
894 @note: This is a single-node call with a timeout of 15m 0s
895 @type node: string
896 @param node: Node name
897 @param instance: Instance object
898
899 """
900 return (self._Call(_def, [node], [instance])[node])
901
904 """Wrapper for RPC call 'instance_migrate'
905
906 Migrate an instance
907
908 @note: This is a single-node call with a timeout of 1h 0m 0s
909 @type node: string
910 @param node: Node name
911 @param cluster_name: Cluster name
912 @param instance: Instance object
913 @param target: Target node name
914 @param live: Whether the migration should be done live or not
915
916 """
917 return (self._Call(_def, [node], [cluster_name, instance, target,
918 live])[node])
919
922 """Wrapper for RPC call 'instance_os_add'
923
924 Starts an instance
925
926 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
927 @type node: string
928 @param node: Node name
929
930 """
931 return (self._Call(_def, [node], [instance_osp, reinstall,
932 debug])[node])
933
936 """Wrapper for RPC call 'instance_reboot'
937
938 Returns the list of running instances on the given nodes
939
940 @note: This is a single-node call with a timeout of 15m 0s
941 @type node: string
942 @param node: Node name
943 @param inst: Instance object
944 @param reason: The reason for the reboot
945
946 """
947 return (self._Call(_def, [node], [inst, reboot_type, shutdown_timeout,
948 reason])[node])
949
952 """Wrapper for RPC call 'instance_run_rename'
953
954 Run the OS rename script for an instance
955
956 @note: This is a single-node call with a timeout of 1h 0m 0s
957 @type node: string
958 @param node: Node name
959 @param instance: Instance object
960
961 """
962 return (self._Call(_def, [node], [instance, old_name, debug])[node])
963
966 """Wrapper for RPC call 'instance_shutdown'
967
968 Stops an instance
969
970 @note: This is a single-node call with a timeout of 15m 0s
971 @type node: string
972 @param node: Node name
973 @param instance: Instance object
974 @param reason: The reason for the shutdown
975
976 """
977 return (self._Call(_def, [node], [instance, timeout, reason])[node])
978
981 """Wrapper for RPC call 'instance_start'
982
983 Starts an instance
984
985 @note: This is a single-node call with a timeout of 15m 0s
986 @type node: string
987 @param node: Node name
988 @param reason: The reason for the startup
989
990 """
991 return (self._Call(_def, [node], [instance_hvp_bep, startup_paused,
992 reason])[node])
993
995 """Wrapper for RPC call 'lv_list'
996
997 Gets the logical volumes present in a given volume group
998
999 @note: This is a multi-node call with a timeout of 1m 0s
1000 @type node_list: list of string
1001 @param node_list: List of node names
1002
1003 """
1004 return (self._Call(_def, node_list, [vg_name]))
1005
1008 """Wrapper for RPC call 'migration_info'
1009
1010 Gather the information necessary to prepare an instance migration
1011
1012 @note: This is a single-node call with a timeout of 15m 0s
1013 @type node: string
1014 @param node: Node name
1015 @param instance: Instance object
1016
1017 """
1018 return (self._Call(_def, [node], [instance])[node])
1019
1034
1037 """Wrapper for RPC call 'node_crypto_tokens'
1038
1039 Handle crypto tokens of the node.
1040
1041 @note: This is a single-node call with a timeout of 1h 0m 0s
1042 @type node: string
1043 @param node: Node name
1044 @param token_request: List of tuples of requested crypto token types,
1045 actions
1046
1047 """
1048 return (self._Call(_def, [node], [token_request])[node])
1049
1052 """Wrapper for RPC call 'node_demote_from_mc'
1053
1054 Demote a node from the master candidate role
1055
1056 @note: This is a single-node call with a timeout of 5m 0s
1057 @type node: string
1058 @param node: Node name
1059
1060 """
1061 return (self._Call(_def, [node], [])[node])
1062
1065 """Wrapper for RPC call 'node_ensure_daemon'
1066
1067 Ensure daemon is running on the node.
1068
1069 @note: This is a multi-node call with a timeout of 1m 0s
1070 @type node_list: list of string
1071 @param node_list: List of node names
1072 @param daemon: Daemon name
1073 @param run: Whether the daemon should be running or stopped
1074
1075 """
1076 return (self._Call(_def, node_list, [daemon, run]))
1077
1080 """Wrapper for RPC call 'node_has_ip_address'
1081
1082 Checks if a node has the given IP address
1083
1084 @note: This is a single-node call with a timeout of 5m 0s
1085 @type node: string
1086 @param node: Node name
1087 @param address: IP address
1088
1089 """
1090 return (self._Call(_def, [node], [address])[node])
1091
1094 """Wrapper for RPC call 'node_info'
1095
1096 Return node information
1097
1098 @note: This is a multi-node call with a timeout of 1m 0s
1099 @type node_list: list of string
1100 @param node_list: List of node names
1101 @param storage_units: List of tuples '<storage_type>,<key>,[<param>]'
1102 to ask for disk space information; the parameter list varies
1103 depending on the storage_type
1104 @param hv_specs: List of hypervisor specification (name, hvparams) to
1105 ask for node information
1106
1107 """
1108 return (self._Call(_def, node_list, [storage_units, hv_specs]))
1109
1112 """Wrapper for RPC call 'node_powercycle'
1113
1114 Tries to powercycle a node
1115
1116 @note: This is a single-node call with a timeout of 15m 0s
1117 @type node: string
1118 @param node: Node name
1119 @param hypervisor: Hypervisor type
1120 @param hvparams: Hypervisor parameters
1121
1122 """
1123 return (self._Call(_def, [node], [hypervisor, hvparams])[node])
1124
1125 - def call_node_verify(self, node_list, checkdict, cluster_name,
1126 all_hvparams, node_groups, groups_cfg, _def=_CALLS['node_verify']):
1127 """Wrapper for RPC call 'node_verify'
1128
1129 Request verification of given parameters
1130
1131 @note: This is a multi-node call with a timeout of 15m 0s
1132 @type node_list: list of string
1133 @param node_list: List of node names
1134 @param checkdict: What to verify
1135 @param cluster_name: Cluster name
1136 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
1137 @param node_groups: node names mapped to their group uuids
1138 @param groups_cfg: a dictionary mapping group uuids to their
1139 configuration
1140
1141 """
1142 return (self._Call(_def, node_list, [checkdict, cluster_name,
1143 all_hvparams, node_groups, groups_cfg]))
1144
1146 """Wrapper for RPC call 'node_volumes'
1147
1148 Gets all volumes on node(s)
1149
1150 @note: This is a multi-node call with a timeout of 5m 0s
1151 @type node_list: list of string
1152 @param node_list: List of node names
1153
1154 """
1155 return (self._Call(_def, node_list, []))
1156
1158 """Wrapper for RPC call 'os_diagnose'
1159
1160 Request a diagnose of OS definitions
1161
1162 @note: This is a multi-node call with a timeout of 5m 0s
1163 @type node_list: list of string
1164 @param node_list: List of node names
1165
1166 """
1167 return (self._Call(_def, node_list, []))
1168
1170 """Wrapper for RPC call 'os_get'
1171
1172 Returns an OS definition
1173
1174 @note: This is a single-node call with a timeout of 5m 0s
1175 @type node: string
1176 @param node: Node name
1177
1178 """
1179 return (self._Call(_def, [node], [name])[node])
1180
1183 """Wrapper for RPC call 'os_validate'
1184
1185 Run a validation routine for a given OS
1186
1187 @note: This is a multi-node call with a timeout of 5m 0s
1188 @type node_list: list of string
1189 @param node_list: List of node names
1190
1191 """
1192 return (self._Call(_def, node_list, [required, name, checks, params]))
1193
1196 """Wrapper for RPC call 'restricted_command'
1197
1198 Runs restricted command
1199
1200 @note: This is a multi-node call with a timeout of 1h 0m 0s
1201 @type node_list: list of string
1202 @param node_list: List of node names
1203 @param cmd: Command name
1204
1205 """
1206 return (self._Call(_def, node_list, [cmd]))
1207
1208 - def call_run_oob(self, node, oob_program, command, remote_node,
1209 timeout, _def=_CALLS['run_oob']):
1210 """Wrapper for RPC call 'run_oob'
1211
1212 Runs out-of-band command
1213
1214 @note: This is a single-node call with a timeout of 15m 0s
1215 @type node: string
1216 @param node: Node name
1217
1218 """
1219 return (self._Call(_def, [node], [oob_program, command, remote_node,
1220 timeout])[node])
1221
1224 """Wrapper for RPC call 'set_watcher_pause'
1225
1226 Set watcher pause end
1227
1228 @note: This is a multi-node call with a timeout of 1m 0s
1229 @type node_list: list of string
1230 @param node_list: List of node names
1231
1232 """
1233 return (self._Call(_def, node_list, [until]))
1234
1237 """Wrapper for RPC call 'storage_execute'
1238
1239 Executes an operation on a storage unit
1240
1241 @note: This is a single-node call with a timeout of 15m 0s
1242 @type node: string
1243 @param node: Node name
1244
1245 """
1246 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1247
1250 """Wrapper for RPC call 'storage_list'
1251
1252 Get list of storage units
1253
1254 @note: This is a multi-node call with a timeout of 15m 0s
1255 @type node_list: list of string
1256 @param node_list: List of node names
1257
1258 """
1259 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1260
1263 """Wrapper for RPC call 'storage_modify'
1264
1265 Modify a storage unit
1266
1267 @note: This is a single-node call with a timeout of 15m 0s
1268 @type node: string
1269 @param node: Node name
1270
1271 """
1272 return (self._Call(_def, [node], [su_name, su_args, name,
1273 changes])[node])
1274
1277 """Wrapper for RPC call 'test_delay'
1278
1279 Sleep for a fixed time on given node(s)
1280
1281 @note: This is a multi-node call
1282 @type node_list: list of string
1283 @param node_list: List of node names
1284
1285 """
1286 return (self._Call(_def, node_list, [duration]))
1287
1289 """Wrapper for RPC call 'vg_list'
1290
1291 Gets the volume group list
1292
1293 @note: This is a multi-node call with a timeout of 1m 0s
1294 @type node_list: list of string
1295 @param node_list: List of node names
1296
1297 """
1298 return (self._Call(_def, node_list, []))
1299
1302 """Wrapper for RPC call 'x509_cert_create'
1303
1304 Creates a new X509 certificate for SSL/TLS
1305
1306 @note: This is a single-node call with a timeout of 15m 0s
1307 @type node: string
1308 @param node: Node name
1309 @param validity: Validity in seconds
1310
1311 """
1312 return (self._Call(_def, [node], [validity])[node])
1313
1316 """Wrapper for RPC call 'x509_cert_remove'
1317
1318 Removes a X509 certificate
1319
1320 @note: This is a single-node call with a timeout of 15m 0s
1321 @type node: string
1322 @param node: Node name
1323 @param name: Certificate name
1324
1325 """
1326 return (self._Call(_def, [node], [name])[node])
1327
1328
1330
1331
1332
1333 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly']
1334
1335 - def call_node_verify_light(self, node_list, checkdict, cluster_name,
1336 hvparams, node_groups, groups_cfg,
1337 _def=_CALLS['node_verify_light']):
1338 """Wrapper for RPC call 'node_verify_light'
1339
1340 Request verification of given parameters
1341
1342 @note: This is a multi-node call with a timeout of 15m 0s
1343 @type node_list: list of string
1344 @param node_list: List of node names
1345 @param checkdict: What to verify
1346 @param cluster_name: Cluster name
1347 @param hvparams: Dictionary mapping hypervisor names to hvparams
1348 @param node_groups: node names mapped to their group uuids
1349 @param groups_cfg: a dictionary mapping group uuids to their
1350 configuration
1351
1352 """
1353 return (self._Call(_def, node_list, [checkdict, cluster_name,
1354 hvparams, node_groups, groups_cfg]))
1355
1357 """Wrapper for RPC call 'version'
1358
1359 Query node version
1360
1361 @note: This is a multi-node call with a timeout of 1m 0s
1362 @type node_list: list of string
1363 @param node_list: List of node names
1364
1365 """
1366 return (self._Call(_def, node_list, []))
1367
1368
1370
1371
1372
1373 _CALLS = rpc_defs.CALLS['RpcClientJobQueue']
1374
1376 """Wrapper for RPC call 'jobqueue_purge'
1377
1378 Purge job queue
1379
1380 @note: This is a single-node call with a timeout of 15m 0s
1381 @type node: string
1382 @param node: Node name
1383
1384 """
1385 return (self._Call(_def, [node], [])[node])
1386
1389 """Wrapper for RPC call 'jobqueue_rename'
1390
1391 Rename job queue file
1392
1393 @note: This is a multi-node call with a timeout of 1m 0s
1394 @type node_list: list of string
1395 @param node_list: List of node names
1396
1397 """
1398 return (self._Call(_def, node_list, [rename]))
1399
1402 """Wrapper for RPC call 'jobqueue_set_drain_flag'
1403
1404 Set job queue drain flag
1405
1406 @note: This is a multi-node call with a timeout of 1m 0s
1407 @type node_list: list of string
1408 @param node_list: List of node names
1409
1410 """
1411 return (self._Call(_def, node_list, [flag]))
1412
1415 """Wrapper for RPC call 'jobqueue_update'
1416
1417 Update job queue file
1418
1419 @note: This is a multi-node call with a timeout of 1m 0s
1420 @type node_list: list of string
1421 @param node_list: List of node names
1422
1423 """
1424 return (self._Call(_def, node_list, [file_name, content]))
1425