File Coverage

blib/lib/Net/Proxmox/VE/Cluster.pm
Criterion Covered Total %
statement 12 142 8.4
branch 0 134 0.0
condition n/a
subroutine 4 27 14.8
pod 23 23 100.0
total 39 326 11.9


line stmt bran cond sub pod time code
1             #!/bin/false
2             # vim: softtabstop=4 tabstop=4 shiftwidth=4 ft=perl expandtab smarttab
3             # PODNAME: Net::Proxmox::VE::Cluster
4             # ABSTRACT: Functions for the 'cluster' portion of the API
5              
6 2     2   221789 use strict;
  2         2  
  2         64  
7 2     2   8 use warnings;
  2         4  
  2         159  
8              
9             package Net::Proxmox::VE::Cluster;
10             $Net::Proxmox::VE::Cluster::VERSION = '0.44';
11 2     2   14 use parent 'Exporter';
  2         5  
  2         15  
12              
13 2     2   478 use Net::Proxmox::VE::Exception;
  2         3  
  2         2493  
14              
15             our @EXPORT = qw(
16             cluster
17             cluster_backup
18             create_cluster_backup
19             get_cluster_backup
20             update_cluster_backup
21             delete_cluster_backup
22             cluster_ha
23             get_cluster_ha_config
24             get_cluster_ha_changes
25             commit_cluster_ha_changes
26             revert_cluster_ha_changes
27             cluster_ha_groups
28             create_cluster_ha_groups
29             get_cluster_ha_groups
30             update_cluster_ha_groups
31             delete_cluster_ha_group
32             get_cluster_log
33             get_cluster_nextid
34             get_cluster_options
35             update_cluster_options
36             get_cluster_resources
37             get_cluster_status
38             get_cluster_tasks
39             );
40              
41              
42             my $BASEPATH = '/cluster';
43              
44             sub cluster {
45              
46 0 0   0 1   my $self = shift or return;
47              
48 0           return $self->get($BASEPATH);
49              
50             }
51              
52              
53             sub cluster_backup {
54              
55 0 0   0 1   my $self = shift or return;
56              
57 0           return $self->get( $BASEPATH, 'backup' );
58              
59             }
60              
61              
62             sub create_cluster_backup {
63              
64 0 0   0 1   my $self = shift or return;
65              
66 0           my @p = @_;
67              
68 0 0         Net::Proxmox::VE::Exception->throw(
69             'No arguments for create_cluster_backup()')
70             unless @p;
71 0           my %args;
72              
73 0 0         if ( @p == 1 ) {
74 0 0         Net::Proxmox::VE::Exception->throw(
75             'Single argument not a hash for create_cluster_backup()')
76             unless ref $p[0] eq 'HASH';
77 0           %args = %{ $p[0] };
  0            
78             }
79             else {
80 0 0         Net::Proxmox::VE::Exception->throw(
81             'Odd number of arguments for create_cluster_backup()')
82             if ( scalar @p % 2 != 0 );
83 0           %args = @p;
84             }
85              
86 0           return $self->post( $BASEPATH, 'backup', \%args );
87              
88             }
89              
90              
91             sub get_cluster_backup {
92              
93 0 0   0 1   my $self = shift or return;
94              
95 0 0         my $id = shift
96             or Net::Proxmox::VE::Exception->throw('No id for get_cluster_backup()');
97 0 0         Net::Proxmox::VE::Exception->throw(
98             'id must be a scalar for get_cluster_backup()')
99             if ref $id;
100              
101 0           return $self->get( $BASEPATH, $id );
102              
103             }
104              
105              
106             sub update_cluster_backup {
107              
108 0 0   0 1   my $self = shift or return;
109              
110 0 0         my $id = shift
111             or
112             Net::Proxmox::VE::Exception->throw('No id for update_cluster_backup()');
113 0 0         Net::Proxmox::VE::Exception->throw(
114             'id must be a scalar for update_cluster_backup()')
115             if ref $id;
116              
117 0           my @p = @_;
118              
119 0 0         Net::Proxmox::VE::Exception->throw(
120             'No arguments for update_cluster_backup()')
121             unless @p;
122 0           my %args;
123              
124 0 0         if ( @p == 1 ) {
125 0 0         Net::Proxmox::VE::Exception->throw(
126             'Single argument not a hash for update_cluster_backup()')
127             unless ref $p[0] eq 'HASH';
128 0           %args = %{ $p[0] };
  0            
129             }
130             else {
131 0 0         Net::Proxmox::VE::Exception->throw(
132             'Odd number of arguments for update_cluster_backup()')
133             if ( scalar @p % 2 != 0 );
134 0           %args = @p;
135             }
136              
137 0           return $self->put( $BASEPATH, 'backup', $id, \%args );
138              
139             }
140              
141              
142             sub delete_cluster_backup {
143              
144 0 0   0 1   my $self = shift or return;
145              
146 0 0         my $id = shift
147             or
148             Net::Proxmox::VE::Exception->throw('No id for delete_cluster_backup()');
149 0 0         Net::Proxmox::VE::Exception->throw(
150             'id must be a scalar for delete_cluster_backup()')
151             if ref $id;
152              
153 0           return $self->delete( $BASEPATH, $id );
154              
155             }
156              
157              
158             sub cluster_ha {
159              
160 0 0   0 1   my $self = shift or return;
161              
162 0           return $self->get( $BASEPATH, 'ha' );
163              
164             }
165              
166              
167             sub get_cluster_ha_config {
168              
169 0 0   0 1   my $self = shift or return;
170              
171 0           return $self->get( $BASEPATH, 'ha', 'config' );
172              
173             }
174              
175              
176             sub get_cluster_ha_changes {
177              
178 0 0   0 1   my $self = shift or return;
179              
180 0           return $self->get( $BASEPATH, 'ha', 'changes' );
181              
182             }
183              
184              
185             sub commit_cluster_ha_changes {
186              
187 0 0   0 1   my $self = shift or return;
188              
189 0           return $self->post( $BASEPATH, 'ha', 'changes' );
190              
191             }
192              
193              
194             sub revert_cluster_ha_changes {
195              
196 0 0   0 1   my $self = shift or return;
197              
198 0           return $self->delete( $BASEPATH, 'ha', 'changes' );
199              
200             }
201              
202              
203             sub cluster_ha_groups {
204              
205 0 0   0 1   my $self = shift or return;
206              
207 0           return $self->get( $BASEPATH, 'ha', 'groups' );
208              
209             }
210              
211              
212             sub create_cluster_ha_groups {
213              
214 0 0   0 1   my $self = shift or return;
215              
216 0           my @p = @_;
217              
218 0 0         Net::Proxmox::VE::Exception->throw(
219             'No arguments for create_cluster_ha_groups()')
220             unless @p;
221 0           my %args;
222              
223 0 0         if ( @p == 1 ) {
224 0 0         Net::Proxmox::VE::Exception->throw(
225             'Single argument not a hash for create_cluster_ha_groups()')
226             unless ref $p[0] eq 'HASH';
227 0           %args = %{ $p[0] };
  0            
228             }
229             else {
230 0 0         Net::Proxmox::VE::Exception->throw(
231             'Odd number of arguments for create_cluster_ha_groups()')
232             if ( scalar @p % 2 != 0 );
233 0           %args = @p;
234             }
235              
236 0           return $self->put( $BASEPATH, 'ha', 'groups', \%args );
237              
238             }
239              
240              
241             sub get_cluster_ha_groups {
242              
243 0 0   0 1   my $self = shift or return;
244              
245 0 0         my $id = shift
246             or
247             Net::Proxmox::VE::Exception->throw('No id for get_cluster_ha_groups()');
248 0 0         Net::Proxmox::VE::Exception->throw(
249             'id must be a scalar for get_cluster_ha_groups()')
250             if ref $id;
251              
252 0           return $self->get( $BASEPATH, 'ha', 'groups', $id );
253              
254             }
255              
256              
257             sub update_cluster_ha_groups {
258              
259 0 0   0 1   my $self = shift or return;
260              
261 0 0         my $id = shift
262             or Net::Proxmox::VE::Exception->throw(
263             'No id for update_cluster_ha_groups()');
264 0 0         Net::Proxmox::VE::Exception->throw(
265             'id must be a scalar for update_cluster_ha_groups()')
266             if ref $id;
267              
268 0           my @p = @_;
269              
270 0 0         Net::Proxmox::VE::Exception->throw(
271             'No arguments for update_cluster_ha_groups()')
272             unless @p;
273 0           my %args;
274              
275 0 0         if ( @p == 1 ) {
276 0 0         Net::Proxmox::VE::Exception->throw(
277             'Single argument not a hash for update_cluster_ha_groups()')
278             unless ref $p[0] eq 'HASH';
279 0           %args = %{ $p[0] };
  0            
280             }
281             else {
282 0 0         Net::Proxmox::VE::Exception->throw(
283             'Odd number of arguments for update_cluster_ha_groups()')
284             if ( scalar @p % 2 != 0 );
285 0           %args = @p;
286             }
287              
288 0           return $self->put( $BASEPATH, 'ha', 'groups', $id, \%args );
289              
290             }
291              
292              
293             sub delete_cluster_ha_group {
294              
295 0 0   0 1   my $self = shift or return;
296              
297 0 0         my $id = shift
298             or
299             Net::Proxmox::VE::Exception->throw('No id for delete_cluster_ha_group()');
300 0 0         Net::Proxmox::VE::Exception->throw(
301             'id must be a scalar for delete_cluster_ha_group()')
302             if ref $id;
303              
304 0           return $self->delete( $BASEPATH, 'ha', 'groups', $id );
305              
306             }
307              
308              
309             sub get_cluster_log {
310              
311 0 0   0 1   my $self = shift or return;
312              
313 0           my @p = @_;
314              
315 0 0         Net::Proxmox::VE::Exception->throw('No arguments for get_cluster_log()')
316             unless @p;
317 0           my %args;
318              
319 0 0         if ( @p == 1 ) {
320 0 0         Net::Proxmox::VE::Exception->throw(
321             'Single argument not a hash for get_cluster_log()')
322             unless ref $p[0] eq 'HASH';
323 0           %args = %{ $p[0] };
  0            
324             }
325             else {
326 0 0         Net::Proxmox::VE::Exception->throw(
327             'Odd number of arguments for get_cluster_log()')
328             if ( scalar @p % 2 != 0 );
329 0           %args = @p;
330             }
331              
332 0           return $self->get( $BASEPATH, 'log', \%args );
333              
334             }
335              
336              
337             sub get_cluster_nextid {
338              
339 0 0   0 1   my $self = shift or return;
340              
341 0           my @p = @_;
342              
343 0 0         Net::Proxmox::VE::Exception->throw('No arguments for get_cluster_nextid()')
344             unless @p;
345 0           my %args;
346              
347 0 0         if ( @p == 1 ) {
348 0 0         Net::Proxmox::VE::Exception->throw(
349             'Single argument not a hash for get_cluster_nextid()')
350             unless ref $p[0] eq 'HASH';
351 0           %args = %{ $p[0] };
  0            
352             }
353             else {
354 0 0         Net::Proxmox::VE::Exception->throw(
355             'Odd number of arguments for get_cluster_nextid()')
356             if ( scalar @p % 2 != 0 );
357 0           %args = @p;
358             }
359              
360 0           return $self->get( $BASEPATH, 'nextid', \%args );
361              
362             }
363              
364              
365             sub get_cluster_options {
366              
367 0 0   0 1   my $self = shift or return;
368              
369 0           return $self->get( $BASEPATH, 'options' );
370              
371             }
372              
373              
374             sub update_cluster_options {
375              
376 0 0   0 1   my $self = shift or return;
377              
378 0           my @p = @_;
379              
380 0 0         Net::Proxmox::VE::Exception->throw(
381             'No arguments for update_cluster_options()')
382             unless @p;
383 0           my %args;
384              
385 0 0         if ( @p == 1 ) {
386 0 0         Net::Proxmox::VE::Exception->throw(
387             'Single argument not a hash for update_cluster_options()')
388             unless ref $p[0] eq 'HASH';
389 0           %args = %{ $p[0] };
  0            
390             }
391             else {
392 0 0         Net::Proxmox::VE::Exception->throw(
393             'Odd number of arguments for update_cluster_options()')
394             if ( scalar @p % 2 != 0 );
395 0           %args = @p;
396             }
397              
398 0           return $self->put( $BASEPATH, 'log', \%args );
399              
400             }
401              
402              
403             sub get_cluster_resources {
404              
405 0 0   0 1   my $self = shift or return;
406              
407 0           my @p = @_;
408              
409 0 0         Net::Proxmox::VE::Exception->throw(
410             'No arguments for get_cluster_resources()')
411             unless @p;
412 0           my %args;
413              
414 0 0         if ( @p == 1 ) {
415 0 0         Net::Proxmox::VE::Exception->throw(
416             'Single argument not a hash for get_cluster_resources()')
417             unless ref $p[0] eq 'HASH';
418 0           %args = %{ $p[0] };
  0            
419             }
420             else {
421 0 0         Net::Proxmox::VE::Exception->throw(
422             'Odd number of arguments for get_cluster_resources()')
423             if ( scalar @p % 2 != 0 );
424 0           %args = @p;
425             }
426              
427 0           return $self->get( $BASEPATH, 'resources', \%args );
428              
429             }
430              
431              
432             sub get_cluster_status {
433              
434 0 0   0 1   my $self = shift or return;
435              
436 0           return $self->get( $BASEPATH, 'status' );
437              
438             }
439              
440              
441             sub get_cluster_tasks {
442              
443 0 0   0 1   my $self = shift or return;
444              
445 0           return $self->get( $BASEPATH, 'tasks' );
446              
447             }
448              
449              
450             1;
451              
452             __END__
453              
454             =pod
455              
456             =encoding UTF-8
457              
458             =head1 NAME
459              
460             Net::Proxmox::VE::Cluster - Functions for the 'cluster' portion of the API
461              
462             =head1 VERSION
463              
464             version 0.44
465              
466             =head1 SYNOPSIS
467              
468             # assuming $obj is a Net::Proxmox::VE object
469              
470             =head1 METHODS
471              
472             =head2 cluster
473              
474             Returns the 'Cluster index':
475              
476             @list = $obj->cluster()
477              
478             Note: Accessible by all authententicated users.
479              
480             =head2 cluster_backup
481              
482             List vzdump backup schedule.
483              
484             @list = $obj->cluster_backup()
485              
486             Note: Accessible by all authententicated users.
487              
488             =head2 create_cluster_backup
489              
490             Create new vzdump backup job.
491              
492             $ok = $obj->create_cluster_backup( \%args )
493              
494             node is a string in pve-node format
495              
496             I<%args> may contain items from the following list
497              
498             =over 4
499              
500             =item starttime
501              
502             String. Job start time, format is HH::MM. Required.
503              
504             =item all
505              
506             Boolean. Backup all known VMs on this host. Required.
507              
508             =item bwlimit
509              
510             Integer. Limit I/O bandwidth (KBytes per second). Optional.
511              
512             =item compress
513              
514             Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional
515              
516             =item dow
517              
518             String. Day of the week in pve-day-of-week-list format. Optional.
519              
520             =item dumpdir
521              
522             String. Store resulting files to specified directory. Optional.
523              
524             =item exclude
525              
526             String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional.
527              
528             =item exclude-path
529              
530             String. Exclude certain files/directories (regex) in string-alist. Optional.
531              
532             =item ionice
533              
534             Integer. Set CFQ ionice priority. Optional.
535              
536             =item lockwait
537              
538             Integer. Maximal time to wait for the global lock (minutes). Optional.
539              
540             =item mailto
541              
542             String. List of email addresses in string-list format. Optional.
543              
544             =item maxfiles
545              
546             Integer. Maximal number of backup files per vm. Optional.
547              
548             =item mode
549              
550             Enum. A value from snapshot, suspend or stop. Backup mode. Optional.
551              
552             =item node
553              
554             String. Only run if executed on this node in pve-node format. Optional.
555              
556             =item quiet
557              
558             Boolean. Be quiet. Optional.
559              
560             =item remove
561              
562             Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional.
563              
564             =item script
565              
566             String. Use specified hook script. Optional.
567              
568             =item size
569              
570             Integer. LVM snapshot size in MB. Optional.
571              
572             =item stdexcludes
573              
574             Boolean. Exclude temporary files and logs. Optional.
575              
576             =item stopwait
577              
578             Integer. Maximal time to wait until a VM is stopped (minutes). Optional.
579              
580             =item storage
581              
582             String. Store resulting file to this storage, in pve-storage-id format. Optional.
583              
584             =item tmpdir
585              
586             String. Store temporary files to specified directory. Optional.
587              
588             =item vmid
589              
590             String. The ID of the VM you want to backup in pve-vm-list format. Optional.
591              
592             =back
593              
594             Note: required permissions are ["perm","/",["Sys.Modify"]]
595              
596             =head2 get_cluster_backup
597              
598             Read vzdump backup job definition.
599              
600             $job = $obj->get_cluster_backup( $id )
601              
602             Where $id is the job ID
603              
604             Note: required permissions are ["perm","/",["Sys.Audit"]]
605              
606             =head2 update_cluster_backup
607              
608             Update vzdump backup job definition.
609              
610             $ok = $obj->update_cluster_backup( \%args )
611              
612             Where $id is the job ID
613              
614             I<%args> may contain items from the following list
615              
616             =over 4
617              
618             =item starttime
619              
620             String. Job start time, format is HH::MM. Required.
621              
622             =item all
623              
624             Boolean. Backup all known VMs on this host. Required.
625              
626             =item bwlimit
627              
628             Integer. Limit I/O bandwidth (KBytes per second). Optional.
629              
630             =item compress
631              
632             Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional
633              
634             =item dow
635              
636             String. Day of the week in pve-day-of-week-list format. Optional.
637              
638             =item dumpdir
639              
640             String. Store resulting files to specified directory. Optional.
641              
642             =item exclude
643              
644             String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional.
645              
646             =item exclude-path
647              
648             String. Exclude certain files/directories (regex) in string-alist. Optional.
649              
650             =item ionice
651              
652             Integer. Set CFQ ionice priority. Optional.
653              
654             =item lockwait
655              
656             Integer. Maximal time to wait for the global lock (minutes). Optional.
657              
658             =item mailto
659              
660             String. List of email addresses in string-list format. Optional.
661              
662             =item maxfiles
663              
664             Integer. Maximal number of backup files per vm. Optional.
665              
666             =item mode
667              
668             Enum. A value from snapshot, suspend or stop. Backup mode. Optional.
669              
670             =item node
671              
672             String. Only run if executed on this node in pve-node format. Optional.
673              
674             =item quiet
675              
676             Boolean. Be quiet. Optional.
677              
678             =item remove
679              
680             Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional.
681              
682             =item script
683              
684             String. Use specified hook script. Optional.
685              
686             =item size
687              
688             Integer. LVM snapshot size in MB. Optional.
689              
690             =item stdexcludes
691              
692             Boolean. Exclude temporary files and logs. Optional.
693              
694             =item stopwait
695              
696             Integer. Maximal time to wait until a VM is stopped (minutes). Optional.
697              
698             =item storage
699              
700             String. Store resulting file to this storage, in pve-storage-id format. Optional.
701              
702             =item tmpdir
703              
704             String. Store temporary files to specified directory. Optional.
705              
706             =item vmid
707              
708             String. The ID of the VM you want to backup in pve-vm-list format. Optional.
709              
710             =back
711              
712             Note: required permissions are ["perm","/",["Sys.Modify"]]
713              
714             =head2 delete_cluster_backup
715              
716             Delete vzdump backup job definition.
717              
718             $job = $obj->delete_cluster_backup( $id )
719              
720             Where $id is the job ID
721              
722             Note: required permissions are ["perm","/",["Sys.Modify"]]
723              
724             =head2 cluster_ha
725              
726             List ha index
727              
728             @list = $obj->cluster_ha()
729              
730             Note: Required permissions are ["perm","/",["Sys.Audit"]]
731              
732             =head2 get_cluster_ha_config
733              
734             List ha config
735              
736             @list = $obj->get_cluster_ha_config()
737              
738             Note: Required permissions are ["perm","/",["Sys.Audit"]]
739              
740             =head2 get_cluster_ha_changes
741              
742             List ha changes
743              
744             @list = $obj->get_cluster_ha_changes()
745              
746             Note: Required permissions are ["perm","/",["Sys.Audit"]]
747              
748             =head2 commit_cluster_ha_changes
749              
750             Commit ha changes
751              
752             @list = $obj->commit_cluster_ha_changes()
753              
754             Note: Required permissions are ["perm","/",["Sys.Modify"]]
755              
756             =head2 revert_cluster_ha_changes
757              
758             Revert ha changes
759              
760             @list = $obj->revert_cluster_ha_changes()
761              
762             Note: Required permissions are ["perm","/",["Sys.Modify"]]
763              
764             =head2 cluster_ha_groups
765              
766             List resource groups
767              
768             @list = $obj->cluster_ha_groups()
769              
770             Note: Required permissions are ["perm","/",["Sys.Audit"]]
771              
772             =head2 create_cluster_ha_groups
773              
774             Create a new resource groups.
775              
776             $ok = $obj->create_cluster_ha_groups( \%args )
777              
778             I<%args> may contain items from the following list
779              
780             =over 4
781              
782             =item vmid
783              
784             Integer. The unique id of the vm in pve-vmid format. Required.
785              
786             =item autostart
787              
788             Boolean. As per the API spec - "Service is started when quorum forms". Optional.
789              
790             =back
791              
792             Note: required permissions are ["perm","/",["Sys.Modify"]]
793              
794             =head2 get_cluster_ha_groups
795              
796             List resource groups
797              
798             $job = $obj->get_cluster_ha_groups( $id )
799              
800             Where $id is the resource group id (for example pvevm:200)
801              
802             Note: required permissions are ["perm","/",["Sys.Audit"]]
803              
804             =head2 update_cluster_ha_groups
805              
806             Update resource groups settings
807              
808             $ok = $obj->update_cluster_ha_groups( $id, \%args )
809              
810             id is the group ID for example pvevm:200
811              
812             I<%args> may contain items from the following list
813              
814             =over 4
815              
816             =item autostart
817              
818             Boolean. As per the API spec - "Service is started when quorum forms". Optional.
819              
820             =back
821              
822             Note: required permissions are ["perm","/",["Sys.Modify"]]
823              
824             =head2 delete_cluster_ha_group
825              
826             Delete resource group
827              
828             $ok = $obj->delete_cluster_ha_group( $id )
829              
830             Where $id is the group ID for example pvevm:200
831              
832             Note: required permissions are ["perm","/",["Sys.Modify"]]
833              
834             =head2 get_cluster_log
835              
836             Read cluster log
837              
838             $job = $obj->get_cluster_log( \%args )
839              
840             Note: Accessible by all authenticated users
841              
842             I<%args> may contain items from the following list
843              
844             =over 4
845              
846             =item max
847              
848             Integer. Maximum number of entries. Optional.
849              
850             =back
851              
852             =head2 get_cluster_nextid
853              
854             Get next free VMID. Pass a VMID to assert that its free (at time of check).
855              
856             $integer = $obj->get_cluster_nextid( \%args )
857              
858             Note: Accessible by all authenticated users
859              
860             I<%args> may contain items from the following list
861              
862             =over 4
863              
864             =item vmid
865              
866             Integer. The (unique) ID of the VM.
867              
868             =back
869              
870             =head2 get_cluster_options
871              
872             Get datacenter options (this is what the API says)
873              
874             @list = $obj->get_cluster_options()
875              
876             Note: Required permissions are ["perm","/",["Sys.Audit"]]
877              
878             =head2 update_cluster_options
879              
880             Update datacenter options (this is what the spec says)
881              
882             $job = $obj->update_cluster_options( \%args )
883              
884             Note: permissions required are ["perm","/",["Sys.Modify"]]
885              
886             I<%args> may contain items from the following list
887              
888             =over 4
889              
890             =item delete
891              
892             String. A list of settings you want to delete in pve-configid-list format. Optional
893              
894             =item http_proxy
895              
896             String. Specify external http proxy to use when downloading, ie http://user:pass@foo:port/. Optional.
897              
898             =item keyboard
899              
900             Enum. Default keyboard layout for VNC sessions. Selected from pt, ja, es, no, is, fr-ca, fr, pt-br, da, fr-ch, sl, de-ch, en-gb, it, en-us, fr-be, hu, pl, nl, mk, fi, lt, sv, de. Optional
901              
902             =item language
903              
904             Enum. Default GUI language. Either en or de. Optional.
905              
906             =back
907              
908             =head2 get_cluster_resources
909              
910             Resources index (cluster wide)
911              
912             @list = $obj->get_cluster_resources()
913              
914             Note: Accessible by all authententicated users.
915              
916             I<%args> may contain items from the following list
917              
918             =over 4
919              
920             =item Type
921              
922             Enum. One from vm, storage or node. Optional.
923              
924             =back
925              
926             =head2 get_cluster_status
927              
928             Get cluster status informations.
929              
930             @list = $obj->get_cluster_status()
931              
932             Note: Required permissions are ["perm","/",["Sys.Audit"]]
933              
934             =head2 get_cluster_tasks
935              
936             List recent tasks (cluster wide)
937              
938             @list = $obj->get_cluster_tasks()
939              
940             Note: Available to all authenticated users
941              
942             =head1 SEE ALSO
943              
944             L<Net::Proxmox::VE>
945              
946             =head1 AUTHOR
947              
948             Dean Hamstead <dean@fragfest.com.au>
949              
950             =head1 COPYRIGHT AND LICENSE
951              
952             This software is Copyright (c) 2026 by Dean Hamstead.
953              
954             This is free software, licensed under:
955              
956             The MIT (X11) License
957              
958             =cut