]> git.proxmox.com Git - pve-manager.git/commitdiff
ceph/destroypool: refactor to use get_storages
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 5 Sep 2017 12:59:39 +0000 (14:59 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 7 Sep 2017 09:38:20 +0000 (11:38 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Ceph.pm

index 53483ddedd293f9a9034908671fc1e25dc2055c2..171a61317981c6059f196eedd6488fcb6fc4674b 100644 (file)
@@ -1846,10 +1846,8 @@ __PACKAGE__->register_method ({
        # vm disks are on it anymore
        if (!$param->{force}) {
            my $storagecfg = PVE::Storage::config();
-           foreach my $storageid (keys %{$storagecfg->{ids}}) {
-               my $storage = $storagecfg->{ids}->{$storageid};
-               next if $storage->{type} ne 'rbd';
-               next if $storage->{pool} ne $pool;
+           foreach my $storageid (keys %$storages) {
+               my $storage = $storages->{$storageid};
 
                # check if any vm disks are on the pool
                my $res = PVE::Storage::vdisk_list($storagecfg, $storageid);