Ceph: add get_cluster_versions helper

to make 'ceph versions' and 'ceph XX versions' accessible.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2019-06-24 13:56:39 +02:00 committed by Thomas Lamprecht
parent 3331257e0f
commit 5b10325d4a

View File

@ -61,6 +61,14 @@ sub get_local_version {
return undef;
}
sub get_cluster_versions {
my ($service, $noerr) = @_;
my $rados = PVE::RADOS->new();
my $cmd = $service ? "$service versions" : 'versions';
return $rados->mon_command({ prefix => $cmd });
}
sub get_config {
my $key = shift;