]>
git.proxmox.com Git - pve-cluster.git/blob - data/PVE/API2/ClusterConfig.pm
ab807bd8ce00c4475b06eabda2d722410adc7612
1 package PVE
::API2
::ClusterConfig
;
8 use PVE
::RPCEnvironment
;
9 use PVE
::JSONSchema
qw(get_standard_option);
12 use base
qw(PVE::RESTHandler);
14 __PACKAGE__-
>register_method({
18 description
=> "Directory index.",
20 additionalProperties
=> 0,
29 links
=> [ { rel
=> 'child', href
=> "{name}" } ],
42 __PACKAGE__-
>register_method({
46 description
=> "Corosync node list.",
48 additionalProperties
=> 0,
56 node
=> { type
=> 'string' },
59 links
=> [ { rel
=> 'child', href
=> "{node}" } ],
65 my $conf = PVE
::Cluster
::cfs_read_file
('corosync.conf');
66 my $nodelist = PVE
::Cluster
::corosync_nodelist
($conf);
68 return PVE
::RESTHandler
::hash_to_array
($nodelist, 'node');
71 __PACKAGE__-
>register_method({
75 description
=> "Get corosync totem protocol settings.",
77 additionalProperties
=> 0,
88 my $conf = PVE
::Cluster
::cfs_read_file
('corosync.conf');
90 return PVE
::Cluster
::corosync_totem_config
($conf);