]>
git.proxmox.com Git - pve-cluster.git/blob - data/PVE/API2/ClusterConfig.pm
1 package PVE
::API2
::ClusterConfig
;
9 use PVE
::RPCEnvironment
;
10 use PVE
::JSONSchema
qw(get_standard_option);
14 use base
qw(PVE::RESTHandler);
16 __PACKAGE__-
>register_method({
20 description
=> "Directory index.",
22 check
=> ['perm', '/', [ 'Sys.Audit' ]],
25 additionalProperties
=> 0,
34 links
=> [ { rel
=> 'child', href
=> "{name}" } ],
47 __PACKAGE__-
>register_method({
51 description
=> "Corosync node list.",
53 check
=> ['perm', '/', [ 'Sys.Audit' ]],
56 additionalProperties
=> 0,
64 node
=> { type
=> 'string' },
67 links
=> [ { rel
=> 'child', href
=> "{node}" } ],
73 my $conf = PVE
::Cluster
::cfs_read_file
('corosync.conf');
74 my $nodelist = PVE
::Corosync
::nodelist
($conf);
76 return PVE
::RESTHandler
::hash_to_array
($nodelist, 'node');
79 __PACKAGE__-
>register_method({
83 description
=> "Get corosync totem protocol settings.",
85 check
=> ['perm', '/', [ 'Sys.Audit' ]],
88 additionalProperties
=> 0,
99 my $conf = PVE
::Cluster
::cfs_read_file
('corosync.conf');
101 my $totem_cfg = $conf->{main
}->{totem
};