[pve-devel] [PATCH RFC 16/21] add API to query totem protocol settings
Dietmar Maurer
dietmar at proxmox.com
Mon Nov 28 08:09:08 CET 2016
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
data/PVE/API2/ClusterConfig.pm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm
index 5e6b09e..f1c2461 100644
--- a/data/PVE/API2/ClusterConfig.pm
+++ b/data/PVE/API2/ClusterConfig.pm
@@ -35,6 +35,7 @@ __PACKAGE__->register_method({
my $result = [
{ name => 'nodes' },
+ { name => 'totem' },
];
return $result;
@@ -69,4 +70,26 @@ __PACKAGE__->register_method({
return PVE::RESTHandler::hash_to_array($nodelist, 'node');
}});
+__PACKAGE__->register_method({
+ name => 'totem',
+ path => 'totem',
+ method => 'GET',
+ description => "Get corosync totem protocol settings.",
+ parameters => {
+ additionalProperties => 0,
+ properties => {},
+ },
+ returns => {
+ type => "object",
+ properties => {},
+ },
+ code => sub {
+ my ($param) = @_;
+
+
+ my $conf = PVE::Cluster::cfs_read_file('corosync.conf');
+
+ return PVE::Cluster::corosync_totem_config($conf);
+ }});
+
1;
--
2.1.4
More information about the pve-devel
mailing list