$storeid must already be validated via the API/Config parser Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- PVE/API2/Ceph.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index 7aee4b66..a49fa9c7 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -815,6 +815,18 @@ my $update_storage = sub { PVE::API2::Storage::Config->update($params); }; +my $remove_storage = sub { + my ($storeid) = @_; + + PVE::API2::Storage::Config->delete({storage => $storeid}); + + my $pve_ceph_keydir = PVE::CephTools::get_config('pve_ceph_keydir'); + my $keyring = "$pve_ceph_keydir/$storeid.keyring"; + if (-f $keyring) { + unlink($keyring) or warn "removing keyring of storage failed: $!\n"; + } +}; + __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