Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- PVE/API2/Ceph.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index a1f5bebe..e7df80a2 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -787,6 +787,24 @@ my $add_storage = sub { } }; +my $get_storages = sub { + my ($pool) = @_; + + my $cfg = PVE::Storage::config(); + + my $storages = $cfg->{ids}; + my $res = {}; + foreach my $storeid (keys %$storages) { + my $curr = $storages->{$storeid}; + $res->{$storeid} = $storages->{$storeid} + if $curr->{type} eq 'rbd' && + $curr->{pveceph} && + (!defined($pool) || $pool eq $curr->{pool}); + } + + return $res; +}; + __PACKAGE__->register_method ({ name => 'listmon', path => 'mon', -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel