1
2
3
4 """Automatically generated RPC client wrappers.
5
6 """
7
8 from ganeti import rpc_defs
9
10
11
13
14
15
16 _CALLS = rpc_defs.CALLS['RpcClientBootstrap']
17
19 """Wrapper for RPC call 'master_info'
20
21 Query master info
22
23 @note: This is a multi-node call with a timeout of 1m 0s
24 @type node_list: list of string
25 @param node_list: List of node names
26
27 """
28 return (self._Call(_def, node_list, []))
29
32 """Wrapper for RPC call 'node_activate_master_ip'
33
34 Activates master IP on a node
35
36 @note: This is a single-node call with a timeout of 5m 0s
37 @type node: string
38 @param node: Node name
39 @param master_params: Network parameters of the master
40 @param use_external_mip_script: Whether to use the user-provided
41 master IP address setup script
42
43 """
44 return (self._Call(_def, [node], [master_params,
45 use_external_mip_script])[node])
46
50 """Wrapper for RPC call 'node_change_master_netmask'
51
52 Change master IP netmask
53
54 @note: This is a single-node call with a timeout of 5m 0s
55 @type node: string
56 @param node: Node name
57 @param old_netmask: The old value of the netmask
58 @param netmask: The new value of the netmask
59 @param master_ip: The master IP
60 @param master_netdev: The master network device
61
62 """
63 return (self._Call(_def, [node], [old_netmask, netmask, master_ip,
64 master_netdev])[node])
65
68 """Wrapper for RPC call 'node_deactivate_master_ip'
69
70 Deactivates master IP on a node
71
72 @note: This is a single-node call with a timeout of 5m 0s
73 @type node: string
74 @param node: Node name
75 @param master_params: Network parameters of the master
76 @param use_external_mip_script: Whether to use the user-provided
77 master IP address setup script
78
79 """
80 return (self._Call(_def, [node], [master_params,
81 use_external_mip_script])[node])
82
85 """Wrapper for RPC call 'node_leave_cluster'
86
87 Requests a node to clean the cluster information it has
88
89 @note: This is a single-node call with a timeout of 15m 0s
90 @type node: string
91 @param node: Node name
92
93 """
94 return (self._Call(_def, [node], [modify_ssh_setup])[node])
95
98 """Wrapper for RPC call 'node_start_master_daemons'
99
100 Starts master daemons on a node
101
102 @note: This is a single-node call with a timeout of 5m 0s
103 @type node: string
104 @param node: Node name
105
106 """
107 return (self._Call(_def, [node], [no_voting])[node])
108
111 """Wrapper for RPC call 'node_stop_master'
112
113 Deactivates master IP and stops master daemons on a node
114
115 @note: This is a single-node call with a timeout of 5m 0s
116 @type node: string
117 @param node: Node name
118
119 """
120 return (self._Call(_def, [node], [])[node])
121
122
124
125
126
127 _CALLS = rpc_defs.CALLS['RpcClientConfig']
128
131 """Wrapper for RPC call 'upload_file'
132
133 Upload a file
134
135 @note: This is a multi-node call with a timeout of 15m 0s
136 @type node_list: list of string
137 @param node_list: List of node names
138
139 """
140 return (self._Call(_def, node_list, [file_name]))
141
144 """Wrapper for RPC call 'write_ssconf_files'
145
146 Write ssconf files
147
148 @note: This is a multi-node call with a timeout of 15m 0s
149 @type node_list: list of string
150 @param node_list: List of node names
151
152 """
153 return (self._Call(_def, node_list, [values]))
154
155
157
158
159
160 _CALLS = rpc_defs.CALLS['RpcClientDefault']
161
164 """Wrapper for RPC call 'accept_instance'
165
166 Prepare a node to accept an instance
167
168 @note: This is a single-node call with a timeout of 15m 0s
169 @type node: string
170 @param node: Node name
171 @param instance: Instance object
172 @param info: Result for the call_migration_info call
173 @param target: Target hostname (usually an IP address)
174
175 """
176 return (self._Call(_def, [node], [instance, info, target])[node])
177
180 """Wrapper for RPC call 'all_instances_info'
181
182 Returns information about all instances on the given nodes
183
184 @note: This is a multi-node call with a timeout of 1m 0s
185 @type node_list: list of string
186 @param node_list: List of node names
187 @param hypervisor_list: Hypervisors to query for instances
188 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
189
190 """
191 return (self._Call(_def, node_list, [hypervisor_list, all_hvparams]))
192
195 """Wrapper for RPC call 'bdev_sizes'
196
197 Gets the sizes of requested block devices present on a node
198
199 @note: This is a multi-node call with a timeout of 1m 0s
200 @type node_list: list of string
201 @param node_list: List of node names
202
203 """
204 return (self._Call(_def, node_list, [devices]))
205
208 """Wrapper for RPC call 'blockdev_addchildren'
209
210 Request adding a list of children to a (mirroring) device
211
212 @note: This is a single-node call with a timeout of 15m 0s
213 @type node: string
214 @param node: Node name
215
216 """
217 return (self._Call(_def, [node], [bdev, ndevs])[node])
218
221 """Wrapper for RPC call 'blockdev_assemble'
222
223 Request assembling of a given block device
224
225 @note: This is a single-node call with a timeout of 15m 0s
226 @type node: string
227 @param node: Node name
228
229 """
230 return (self._Call(_def, [node], [disk, instance, on_primary,
231 idx])[node])
232
235 """Wrapper for RPC call 'blockdev_close'
236
237 Closes the given block devices
238
239 @note: This is a single-node call with a timeout of 15m 0s
240 @type node: string
241 @param node: Node name
242
243 """
244 return (self._Call(_def, [node], [instance_name, disks])[node])
245
246 - def call_blockdev_create(self, node, bdev, size, owner, on_primary,
247 info, exclusive_storage, _def=_CALLS['blockdev_create']):
248 """Wrapper for RPC call 'blockdev_create'
249
250 Request creation of a given block device
251
252 @note: This is a single-node call with a timeout of 15m 0s
253 @type node: string
254 @param node: Node name
255
256 """
257 return (self._Call(_def, [node], [bdev, size, owner, on_primary, info,
258 exclusive_storage])[node])
259
262 """Wrapper for RPC call 'blockdev_export'
263
264 Export a given disk to another node
265
266 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
267 @type node: string
268 @param node: Node name
269
270 """
271 return (self._Call(_def, [node], [cf_bdev, dest_node_ip, dest_path,
272 cluster_name])[node])
273
276 """Wrapper for RPC call 'blockdev_find'
277
278 Request identification of a given block device
279
280 @note: This is a single-node call with a timeout of 15m 0s
281 @type node: string
282 @param node: Node name
283
284 """
285 return (self._Call(_def, [node], [disk])[node])
286
289 """Wrapper for RPC call 'blockdev_getdimensions'
290
291 Returns size and spindles of the given disks
292
293 @note: This is a single-node call with a timeout of 15m 0s
294 @type node: string
295 @param node: Node name
296
297 """
298 return (self._Call(_def, [node], [disks])[node])
299
302 """Wrapper for RPC call 'blockdev_getmirrorstatus'
303
304 Request status of a (mirroring) device
305
306 @note: This is a single-node call with a timeout of 15m 0s
307 @type node: string
308 @param node: Node name
309
310 """
311 return (self._Call(_def, [node], [disks])[node])
312
315 """Wrapper for RPC call 'blockdev_getmirrorstatus_multi'
316
317 Request status of (mirroring) devices from multiple nodes
318
319 @note: This is a multi-node call with a timeout of 15m 0s
320 @type node_list: list of string
321 @param node_list: List of node names
322
323 """
324 return (self._Call(_def, node_list, [node_disks]))
325
328 """Wrapper for RPC call 'blockdev_grow'
329
330 Request growing of the given block device by a given amount
331
332 @note: This is a single-node call with a timeout of 15m 0s
333 @type node: string
334 @param node: Node name
335
336 """
337 return (self._Call(_def, [node], [cf_bdev, amount, dryrun,
338 backingstore, es_flag])[node])
339
342 """Wrapper for RPC call 'blockdev_pause_resume_sync'
343
344 Request a pause/resume of given block device
345
346 @note: This is a single-node call with a timeout of 15m 0s
347 @type node: string
348 @param node: Node name
349
350 """
351 return (self._Call(_def, [node], [disks, pause])[node])
352
355 """Wrapper for RPC call 'blockdev_remove'
356
357 Request removal of a given block device
358
359 @note: This is a single-node call with a timeout of 15m 0s
360 @type node: string
361 @param node: Node name
362
363 """
364 return (self._Call(_def, [node], [bdev])[node])
365
368 """Wrapper for RPC call 'blockdev_removechildren'
369
370 Request removing a list of children from a (mirroring) device
371
372 @note: This is a single-node call with a timeout of 15m 0s
373 @type node: string
374 @param node: Node name
375
376 """
377 return (self._Call(_def, [node], [bdev, ndevs])[node])
378
381 """Wrapper for RPC call 'blockdev_rename'
382
383 Request rename of the given block devices
384
385 @note: This is a single-node call with a timeout of 15m 0s
386 @type node: string
387 @param node: Node name
388
389 """
390 return (self._Call(_def, [node], [devlist])[node])
391
394 """Wrapper for RPC call 'blockdev_setinfo'
395
396 Sets metadata information on a given block device
397
398 @note: This is a single-node call with a timeout of 15m 0s
399 @type node: string
400 @param node: Node name
401
402 """
403 return (self._Call(_def, [node], [disk, info])[node])
404
407 """Wrapper for RPC call 'blockdev_shutdown'
408
409 Request shutdown of a given block device
410
411 @note: This is a single-node call with a timeout of 15m 0s
412 @type node: string
413 @param node: Node name
414
415 """
416 return (self._Call(_def, [node], [disk])[node])
417
420 """Wrapper for RPC call 'blockdev_snapshot'
421
422 Export a given disk to another node
423
424 @note: This is a single-node call with a timeout of 15m 0s
425 @type node: string
426 @param node: Node name
427
428 """
429 return (self._Call(_def, [node], [cf_bdev])[node])
430
433 """Wrapper for RPC call 'blockdev_wipe'
434
435 Request wipe at given offset with given size of a block device
436
437 @note: This is a single-node call with a timeout of 1h 0m 0s
438 @type node: string
439 @param node: Node name
440
441 """
442 return (self._Call(_def, [node], [bdev, offset, size])[node])
443
446 """Wrapper for RPC call 'bridges_exist'
447
448 Checks if a node has all the bridges given
449
450 @note: This is a single-node call with a timeout of 1m 0s
451 @type node: string
452 @param node: Node name
453 @param bridges_list: Bridges which must be present on remote node
454
455 """
456 return (self._Call(_def, [node], [bridges_list])[node])
457
460 """Wrapper for RPC call 'drbd_attach_net'
461
462 Connects the given DRBD devices
463
464 @note: This is a multi-node call with a timeout of 15m 0s
465 @type node_list: list of string
466 @param node_list: List of node names
467
468 """
469 return (self._Call(_def, node_list, [disks, instance_name,
470 multimaster]))
471
474 """Wrapper for RPC call 'drbd_disconnect_net'
475
476 Disconnects the network of the given drbd devices
477
478 @note: This is a multi-node call with a timeout of 15m 0s
479 @type node_list: list of string
480 @param node_list: List of node names
481
482 """
483 return (self._Call(_def, node_list, [disks]))
484
486 """Wrapper for RPC call 'drbd_helper'
487
488 Gets DRBD helper
489
490 @note: This is a multi-node call with a timeout of 1m 0s
491 @type node_list: list of string
492 @param node_list: List of node names
493
494 """
495 return (self._Call(_def, node_list, []))
496
499 """Wrapper for RPC call 'drbd_needs_activation'
500
501 Returns the drbd disks which need activation
502
503 @note: This is a single-node call with a timeout of 15m 0s
504 @type node: string
505 @param node: Node name
506
507 """
508 return (self._Call(_def, [node], [disks])[node])
509
512 """Wrapper for RPC call 'drbd_wait_sync'
513
514 Waits for the synchronization of drbd devices is complete
515
516 @note: This is a multi-node call with a timeout of 1h 0m 0s
517 @type node_list: list of string
518 @param node_list: List of node names
519
520 """
521 return (self._Call(_def, node_list, [disks]))
522
525 """Wrapper for RPC call 'etc_hosts_modify'
526
527 Modify hosts file with name
528
529 @note: This is a single-node call with a timeout of 15m 0s
530 @type node: string
531 @param node: Node name
532 @param mode: Mode to operate; currently L{constants.ETC_HOSTS_ADD} or
533 L{constants.ETC_HOSTS_REMOVE}
534 @param name: Hostname to be modified
535 @param ip: IP address (L{constants.ETC_HOSTS_ADD} only)
536
537 """
538 return (self._Call(_def, [node], [mode, name, ip])[node])
539
541 """Wrapper for RPC call 'export_info'
542
543 Queries the export information in a given path
544
545 @note: This is a single-node call with a timeout of 5m 0s
546 @type node: string
547 @param node: Node name
548
549 """
550 return (self._Call(_def, [node], [path])[node])
551
553 """Wrapper for RPC call 'export_list'
554
555 Gets the stored exports list
556
557 @note: This is a multi-node call with a timeout of 5m 0s
558 @type node_list: list of string
559 @param node_list: List of node names
560
561 """
562 return (self._Call(_def, node_list, []))
563
566 """Wrapper for RPC call 'export_remove'
567
568 Requests removal of a given export
569
570 @note: This is a single-node call with a timeout of 5m 0s
571 @type node: string
572 @param node: Node name
573
574 """
575 return (self._Call(_def, [node], [export])[node])
576
577 - def call_export_start(self, node, opts, host, port, instance,
578 component, source, _def=_CALLS['export_start']):
579 """Wrapper for RPC call 'export_start'
580
581 Starts an export daemon
582
583 @note: This is a single-node call with a timeout of 15m 0s
584 @type node: string
585 @param node: Node name
586 @param source: Export source
587
588 """
589 return (self._Call(_def, [node], [opts, host, port, instance,
590 component, source])[node])
591
594 """Wrapper for RPC call 'extstorage_diagnose'
595
596 Request a diagnose of ExtStorage Providers
597
598 @note: This is a multi-node call with a timeout of 5m 0s
599 @type node_list: list of string
600 @param node_list: List of node names
601
602 """
603 return (self._Call(_def, node_list, []))
604
607 """Wrapper for RPC call 'file_storage_dir_create'
608
609 Create the given file storage directory
610
611 @note: This is a single-node call with a timeout of 5m 0s
612 @type node: string
613 @param node: Node name
614 @param file_storage_dir: File storage directory
615
616 """
617 return (self._Call(_def, [node], [file_storage_dir])[node])
618
621 """Wrapper for RPC call 'file_storage_dir_remove'
622
623 Remove the given file storage directory
624
625 @note: This is a single-node call with a timeout of 5m 0s
626 @type node: string
627 @param node: Node name
628 @param file_storage_dir: File storage directory
629
630 """
631 return (self._Call(_def, [node], [file_storage_dir])[node])
632
635 """Wrapper for RPC call 'file_storage_dir_rename'
636
637 Rename file storage directory
638
639 @note: This is a single-node call with a timeout of 5m 0s
640 @type node: string
641 @param node: Node name
642 @param old_file_storage_dir: Old name
643 @param new_file_storage_dir: New name
644
645 """
646 return (self._Call(_def, [node], [old_file_storage_dir,
647 new_file_storage_dir])[node])
648
651 """Wrapper for RPC call 'finalize_export'
652
653 Request the completion of an export operation
654
655 @note: This is a single-node call with a timeout of 15m 0s
656 @type node: string
657 @param node: Node name
658
659 """
660 return (self._Call(_def, [node], [instance, snap_disks])[node])
661
664 """Wrapper for RPC call 'get_watcher_pause'
665
666 Get watcher pause end
667
668 @note: This is a single-node call with a timeout of 1m 0s
669 @type node: string
670 @param node: Node name
671
672 """
673 return (self._Call(_def, [node], [])[node])
674
677 """Wrapper for RPC call 'hooks_runner'
678
679 Call the hooks runner
680
681 @note: This is a multi-node call with a timeout of 15m 0s
682 @type node_list: list of string
683 @param node_list: List of node names
684
685 """
686 return (self._Call(_def, node_list, [hpath, phase, env]))
687
690 """Wrapper for RPC call 'hotplug_device'
691
692 Hoplug a device to a running instance
693
694 @note: This is a single-node call with a timeout of 15m 0s
695 @type node: string
696 @param node: Node name
697 @param instance: Instance object
698 @param action: Hotplug Action
699 @param dev_type: Device type
700 @param device: Device dict
701 @param extra: Extra info for device (dev_path for disk)
702 @param seq: Device seq
703
704 """
705 return (self._Call(_def, [node], [instance, action, dev_type, device,
706 extra, seq])[node])
707
710 """Wrapper for RPC call 'hotplug_supported'
711
712 Check if hotplug is supported
713
714 @note: This is a single-node call with a timeout of 15m 0s
715 @type node: string
716 @param node: Node name
717 @param instance: Instance object
718
719 """
720 return (self._Call(_def, [node], [instance])[node])
721
724 """Wrapper for RPC call 'hypervisor_validate_params'
725
726 Validate hypervisor params
727
728 @note: This is a multi-node call with a timeout of 15m 0s
729 @type node_list: list of string
730 @param node_list: List of node names
731 @param hvname: Hypervisor name
732 @param hvfull: Parameters to be validated
733
734 """
735 return (self._Call(_def, node_list, [hvname, hvfull]))
736
739 """Wrapper for RPC call 'iallocator_runner'
740
741 Call an iallocator on a remote node
742
743 @note: This is a single-node call with a timeout of 15m 0s
744 @type node: string
745 @param node: Node name
746 @param name: Iallocator name
747 @param idata: JSON-encoded input string
748
749 """
750 return (self._Call(_def, [node], [name, idata])[node])
751
753 """Wrapper for RPC call 'impexp_abort'
754
755 Aborts an import or export
756
757 @note: This is a single-node call with a timeout of 15m 0s
758 @type node: string
759 @param node: Node name
760 @param name: Import/export name
761
762 """
763 return (self._Call(_def, [node], [name])[node])
764
767 """Wrapper for RPC call 'impexp_cleanup'
768
769 Cleans up after an import or export
770
771 @note: This is a single-node call with a timeout of 15m 0s
772 @type node: string
773 @param node: Node name
774 @param name: Import/export name
775
776 """
777 return (self._Call(_def, [node], [name])[node])
778
781 """Wrapper for RPC call 'impexp_status'
782
783 Gets the status of an import or export
784
785 @note: This is a single-node call with a timeout of 5m 0s
786 @type node: string
787 @param node: Node name
788 @param names: Import/export names
789
790 """
791 return (self._Call(_def, [node], [names])[node])
792
795 """Wrapper for RPC call 'import_start'
796
797 Starts an import daemon
798
799 @note: This is a single-node call with a timeout of 15m 0s
800 @type node: string
801 @param node: Node name
802 @param dest: Import destination
803
804 """
805 return (self._Call(_def, [node], [opts, instance, component,
806 dest])[node])
807
810 """Wrapper for RPC call 'instance_balloon_memory'
811
812 Modify the amount of an instance's runtime memory
813
814 @note: This is a single-node call with a timeout of 15m 0s
815 @type node: string
816 @param node: Node name
817 @param instance: Instance object
818
819 """
820 return (self._Call(_def, [node], [instance, memory])[node])
821
824 """Wrapper for RPC call 'instance_finalize_migration_dst'
825
826 Finalize any target-node migration specific operation
827
828 @note: This is a single-node call with a timeout of 15m 0s
829 @type node: string
830 @param node: Node name
831 @param instance: Instance object
832 @param info: Result for the call_migration_info call
833 @param success: Whether the migration was a success or failure
834
835 """
836 return (self._Call(_def, [node], [instance, info, success])[node])
837
840 """Wrapper for RPC call 'instance_finalize_migration_src'
841
842 Finalize the instance migration on the source node
843
844 @note: This is a single-node call with a timeout of 1h 0m 0s
845 @type node: string
846 @param node: Node name
847 @param instance: Instance object
848 @param success: Whether the migration succeeded or not
849 @param live: Whether the user requested a live migration or not
850
851 """
852 return (self._Call(_def, [node], [instance, success, live])[node])
853
856 """Wrapper for RPC call 'instance_get_migration_status'
857
858 Report migration status
859
860 @note: This is a single-node call with a timeout of 1h 0m 0s
861 @type node: string
862 @param node: Node name
863 @param instance: Instance object
864
865 """
866 return (self._Call(_def, [node], [instance])[node])
867
870 """Wrapper for RPC call 'instance_info'
871
872 Returns information about a single instance
873
874 @note: This is a single-node call with a timeout of 1m 0s
875 @type node: string
876 @param node: Node name
877 @param instance: Instance name
878 @param hname: Hypervisor type
879 @param hvparams: Hypervisor parameters
880
881 """
882 return (self._Call(_def, [node], [instance, hname, hvparams])[node])
883
886 """Wrapper for RPC call 'instance_list'
887
888 Returns the list of running instances on the given nodes
889
890 @note: This is a multi-node call with a timeout of 1m 0s
891 @type node_list: list of string
892 @param node_list: List of node names
893 @param hypervisor_list: Hypervisors to query for instances
894 @param hvparams: Hvparams of all hypervisors
895
896 """
897 return (self._Call(_def, node_list, [hypervisor_list, hvparams]))
898
901 """Wrapper for RPC call 'instance_migratable'
902
903 Checks whether the given instance can be migrated
904
905 @note: This is a single-node call with a timeout of 15m 0s
906 @type node: string
907 @param node: Node name
908 @param instance: Instance object
909
910 """
911 return (self._Call(_def, [node], [instance])[node])
912
915 """Wrapper for RPC call 'instance_migrate'
916
917 Migrate an instance
918
919 @note: This is a single-node call with a timeout of 1h 0m 0s
920 @type node: string
921 @param node: Node name
922 @param cluster_name: Cluster name
923 @param instance: Instance object
924 @param target: Target node name
925 @param live: Whether the migration should be done live or not
926
927 """
928 return (self._Call(_def, [node], [cluster_name, instance, target,
929 live])[node])
930
933 """Wrapper for RPC call 'instance_os_add'
934
935 Starts an instance
936
937 @note: This is a single-node call with a timeout of 1d 0h 0m 0s
938 @type node: string
939 @param node: Node name
940
941 """
942 return (self._Call(_def, [node], [instance_osp, reinstall,
943 debug])[node])
944
947 """Wrapper for RPC call 'instance_reboot'
948
949 Returns the list of running instances on the given nodes
950
951 @note: This is a single-node call with a timeout of 15m 0s
952 @type node: string
953 @param node: Node name
954 @param inst: Instance object
955 @param reason: The reason for the reboot
956
957 """
958 return (self._Call(_def, [node], [inst, reboot_type, shutdown_timeout,
959 reason])[node])
960
963 """Wrapper for RPC call 'instance_run_rename'
964
965 Run the OS rename script for an instance
966
967 @note: This is a single-node call with a timeout of 1h 0m 0s
968 @type node: string
969 @param node: Node name
970 @param instance: Instance object
971
972 """
973 return (self._Call(_def, [node], [instance, old_name, debug])[node])
974
977 """Wrapper for RPC call 'instance_shutdown'
978
979 Stops an instance
980
981 @note: This is a single-node call with a timeout of 15m 0s
982 @type node: string
983 @param node: Node name
984 @param instance: Instance object
985 @param reason: The reason for the shutdown
986
987 """
988 return (self._Call(_def, [node], [instance, timeout, reason])[node])
989
992 """Wrapper for RPC call 'instance_start'
993
994 Starts an instance
995
996 @note: This is a single-node call with a timeout of 15m 0s
997 @type node: string
998 @param node: Node name
999 @param reason: The reason for the startup
1000
1001 """
1002 return (self._Call(_def, [node], [instance_hvp_bep, startup_paused,
1003 reason])[node])
1004
1006 """Wrapper for RPC call 'lv_list'
1007
1008 Gets the logical volumes present in a given volume group
1009
1010 @note: This is a multi-node call with a timeout of 1m 0s
1011 @type node_list: list of string
1012 @param node_list: List of node names
1013
1014 """
1015 return (self._Call(_def, node_list, [vg_name]))
1016
1019 """Wrapper for RPC call 'migration_info'
1020
1021 Gather the information necessary to prepare an instance migration
1022
1023 @note: This is a single-node call with a timeout of 15m 0s
1024 @type node: string
1025 @param node: Node name
1026 @param instance: Instance object
1027
1028 """
1029 return (self._Call(_def, [node], [instance])[node])
1030
1045
1048 """Wrapper for RPC call 'node_demote_from_mc'
1049
1050 Demote a node from the master candidate role
1051
1052 @note: This is a single-node call with a timeout of 5m 0s
1053 @type node: string
1054 @param node: Node name
1055
1056 """
1057 return (self._Call(_def, [node], [])[node])
1058
1061 """Wrapper for RPC call 'node_has_ip_address'
1062
1063 Checks if a node has the given IP address
1064
1065 @note: This is a single-node call with a timeout of 5m 0s
1066 @type node: string
1067 @param node: Node name
1068 @param address: IP address
1069
1070 """
1071 return (self._Call(_def, [node], [address])[node])
1072
1075 """Wrapper for RPC call 'node_info'
1076
1077 Return node information
1078
1079 @note: This is a multi-node call with a timeout of 1m 0s
1080 @type node_list: list of string
1081 @param node_list: List of node names
1082 @param storage_units: List of tuples '<storage_type>,<key>,[<param>]'
1083 to ask for disk space information; the parameter list varies
1084 depending on the storage_type
1085 @param hv_specs: List of hypervisor specification (name, hvparams) to
1086 ask for node information
1087
1088 """
1089 return (self._Call(_def, node_list, [storage_units, hv_specs]))
1090
1093 """Wrapper for RPC call 'node_powercycle'
1094
1095 Tries to powercycle a node
1096
1097 @note: This is a single-node call with a timeout of 15m 0s
1098 @type node: string
1099 @param node: Node name
1100 @param hypervisor: Hypervisor type
1101 @param hvparams: Hypervisor parameters
1102
1103 """
1104 return (self._Call(_def, [node], [hypervisor, hvparams])[node])
1105
1106 - def call_node_verify(self, node_list, checkdict, cluster_name,
1107 all_hvparams, _def=_CALLS['node_verify']):
1108 """Wrapper for RPC call 'node_verify'
1109
1110 Request verification of given parameters
1111
1112 @note: This is a multi-node call with a timeout of 15m 0s
1113 @type node_list: list of string
1114 @param node_list: List of node names
1115 @param checkdict: What to verify
1116 @param cluster_name: Cluster name
1117 @param all_hvparams: Dictionary mapping hypervisor names to hvparams
1118
1119 """
1120 return (self._Call(_def, node_list, [checkdict, cluster_name,
1121 all_hvparams]))
1122
1124 """Wrapper for RPC call 'node_volumes'
1125
1126 Gets all volumes on node(s)
1127
1128 @note: This is a multi-node call with a timeout of 5m 0s
1129 @type node_list: list of string
1130 @param node_list: List of node names
1131
1132 """
1133 return (self._Call(_def, node_list, []))
1134
1136 """Wrapper for RPC call 'os_diagnose'
1137
1138 Request a diagnose of OS definitions
1139
1140 @note: This is a multi-node call with a timeout of 5m 0s
1141 @type node_list: list of string
1142 @param node_list: List of node names
1143
1144 """
1145 return (self._Call(_def, node_list, []))
1146
1148 """Wrapper for RPC call 'os_get'
1149
1150 Returns an OS definition
1151
1152 @note: This is a single-node call with a timeout of 5m 0s
1153 @type node: string
1154 @param node: Node name
1155
1156 """
1157 return (self._Call(_def, [node], [name])[node])
1158
1161 """Wrapper for RPC call 'os_validate'
1162
1163 Run a validation routine for a given OS
1164
1165 @note: This is a multi-node call with a timeout of 5m 0s
1166 @type node_list: list of string
1167 @param node_list: List of node names
1168
1169 """
1170 return (self._Call(_def, node_list, [required, name, checks, params]))
1171
1174 """Wrapper for RPC call 'restricted_command'
1175
1176 Runs restricted command
1177
1178 @note: This is a multi-node call with a timeout of 1h 0m 0s
1179 @type node_list: list of string
1180 @param node_list: List of node names
1181 @param cmd: Command name
1182
1183 """
1184 return (self._Call(_def, node_list, [cmd]))
1185
1186 - def call_run_oob(self, node, oob_program, command, remote_node,
1187 timeout, _def=_CALLS['run_oob']):
1188 """Wrapper for RPC call 'run_oob'
1189
1190 Runs out-of-band command
1191
1192 @note: This is a single-node call with a timeout of 15m 0s
1193 @type node: string
1194 @param node: Node name
1195
1196 """
1197 return (self._Call(_def, [node], [oob_program, command, remote_node,
1198 timeout])[node])
1199
1202 """Wrapper for RPC call 'set_watcher_pause'
1203
1204 Set watcher pause end
1205
1206 @note: This is a multi-node call with a timeout of 1m 0s
1207 @type node_list: list of string
1208 @param node_list: List of node names
1209
1210 """
1211 return (self._Call(_def, node_list, [until]))
1212
1215 """Wrapper for RPC call 'storage_execute'
1216
1217 Executes an operation on a storage unit
1218
1219 @note: This is a single-node call with a timeout of 15m 0s
1220 @type node: string
1221 @param node: Node name
1222
1223 """
1224 return (self._Call(_def, [node], [su_name, su_args, name, op])[node])
1225
1228 """Wrapper for RPC call 'storage_list'
1229
1230 Get list of storage units
1231
1232 @note: This is a multi-node call with a timeout of 15m 0s
1233 @type node_list: list of string
1234 @param node_list: List of node names
1235
1236 """
1237 return (self._Call(_def, node_list, [su_name, su_args, name, fields]))
1238
1241 """Wrapper for RPC call 'storage_modify'
1242
1243 Modify a storage unit
1244
1245 @note: This is a single-node call with a timeout of 15m 0s
1246 @type node: string
1247 @param node: Node name
1248
1249 """
1250 return (self._Call(_def, [node], [su_name, su_args, name,
1251 changes])[node])
1252
1255 """Wrapper for RPC call 'test_delay'
1256
1257 Sleep for a fixed time on given node(s)
1258
1259 @note: This is a multi-node call
1260 @type node_list: list of string
1261 @param node_list: List of node names
1262
1263 """
1264 return (self._Call(_def, node_list, [duration]))
1265
1267 """Wrapper for RPC call 'vg_list'
1268
1269 Gets the volume group list
1270
1271 @note: This is a multi-node call with a timeout of 1m 0s
1272 @type node_list: list of string
1273 @param node_list: List of node names
1274
1275 """
1276 return (self._Call(_def, node_list, []))
1277
1280 """Wrapper for RPC call 'x509_cert_create'
1281
1282 Creates a new X509 certificate for SSL/TLS
1283
1284 @note: This is a single-node call with a timeout of 15m 0s
1285 @type node: string
1286 @param node: Node name
1287 @param validity: Validity in seconds
1288
1289 """
1290 return (self._Call(_def, [node], [validity])[node])
1291
1294 """Wrapper for RPC call 'x509_cert_remove'
1295
1296 Removes a X509 certificate
1297
1298 @note: This is a single-node call with a timeout of 15m 0s
1299 @type node: string
1300 @param node: Node name
1301 @param name: Certificate name
1302
1303 """
1304 return (self._Call(_def, [node], [name])[node])
1305
1306
1308
1309
1310
1311 _CALLS = rpc_defs.CALLS['RpcClientDnsOnly']
1312
1315 """Wrapper for RPC call 'node_verify_light'
1316
1317 Request verification of given parameters
1318
1319 @note: This is a multi-node call with a timeout of 15m 0s
1320 @type node_list: list of string
1321 @param node_list: List of node names
1322 @param checkdict: What to verify
1323 @param cluster_name: Cluster name
1324 @param hvparams: Dictionary mapping hypervisor names to hvparams
1325
1326 """
1327 return (self._Call(_def, node_list, [checkdict, cluster_name,
1328 hvparams]))
1329
1331 """Wrapper for RPC call 'version'
1332
1333 Query node version
1334
1335 @note: This is a multi-node call with a timeout of 1m 0s
1336 @type node_list: list of string
1337 @param node_list: List of node names
1338
1339 """
1340 return (self._Call(_def, node_list, []))
1341
1342
1344
1345
1346
1347 _CALLS = rpc_defs.CALLS['RpcClientJobQueue']
1348
1350 """Wrapper for RPC call 'jobqueue_purge'
1351
1352 Purge job queue
1353
1354 @note: This is a single-node call with a timeout of 15m 0s
1355 @type node: string
1356 @param node: Node name
1357
1358 """
1359 return (self._Call(_def, [node], [])[node])
1360
1363 """Wrapper for RPC call 'jobqueue_rename'
1364
1365 Rename job queue file
1366
1367 @note: This is a multi-node call with a timeout of 1m 0s
1368 @type node_list: list of string
1369 @param node_list: List of node names
1370
1371 """
1372 return (self._Call(_def, node_list, [rename]))
1373
1376 """Wrapper for RPC call 'jobqueue_set_drain_flag'
1377
1378 Set job queue drain flag
1379
1380 @note: This is a multi-node call with a timeout of 1m 0s
1381 @type node_list: list of string
1382 @param node_list: List of node names
1383
1384 """
1385 return (self._Call(_def, node_list, [flag]))
1386
1389 """Wrapper for RPC call 'jobqueue_update'
1390
1391 Update 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, [file_name, content]))
1399