mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 23:20:24 +00:00
ceph/destroypool: refactor to use get_storages
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
f6144f3493
commit
c75f019a55
@ -1846,10 +1846,8 @@ __PACKAGE__->register_method ({
|
|||||||
# vm disks are on it anymore
|
# vm disks are on it anymore
|
||||||
if (!$param->{force}) {
|
if (!$param->{force}) {
|
||||||
my $storagecfg = PVE::Storage::config();
|
my $storagecfg = PVE::Storage::config();
|
||||||
foreach my $storageid (keys %{$storagecfg->{ids}}) {
|
foreach my $storageid (keys %$storages) {
|
||||||
my $storage = $storagecfg->{ids}->{$storageid};
|
my $storage = $storages->{$storageid};
|
||||||
next if $storage->{type} ne 'rbd';
|
|
||||||
next if $storage->{pool} ne $pool;
|
|
||||||
|
|
||||||
# check if any vm disks are on the pool
|
# check if any vm disks are on the pool
|
||||||
my $res = PVE::Storage::vdisk_list($storagecfg, $storageid);
|
my $res = PVE::Storage::vdisk_list($storagecfg, $storageid);
|
||||||
|
Loading…
Reference in New Issue
Block a user