[pve-devel] applied: [PATCH manager 1/2] Ceph: add get_cluster_versions helper

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jun 25 09:52:15 CEST 2019


On 6/24/19 1:56 PM, Fabian Grünbichler wrote:
> to make 'ceph versions' and 'ceph XX versions' accessible.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/Ceph/Tools.pm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/PVE/Ceph/Tools.pm b/PVE/Ceph/Tools.pm
> index 617aba66..319e2ddd 100644
> --- a/PVE/Ceph/Tools.pm
> +++ b/PVE/Ceph/Tools.pm
> @@ -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;
>  
> 

applied





More information about the pve-devel mailing list