5
0
mirror of git://git.proxmox.com/git/pve-ha-manager.git synced 2025-01-25 10:03:53 +03:00

api: delete resource: refactor and cleanup indentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-01-23 13:42:11 +01:00
parent 60d1b1cacf
commit 6b68528bc6

View File

@ -304,16 +304,13 @@ __PACKAGE__->register_method ({
die "cannot delete service '$sid', not HA managed!\n";
}
PVE::HA::Config::lock_ha_domain(
sub {
PVE::HA::Config::lock_ha_domain(sub {
$cfg = PVE::HA::Config::read_resources_config();
$cfg = PVE::HA::Config::read_resources_config();
delete $cfg->{ids}->{$sid} or die "'$sid' not configured!\n";
PVE::HA::Config::write_resources_config($cfg);
delete $cfg->{ids}->{$sid};
PVE::HA::Config::write_resources_config($cfg)
}, "delete resource failed");
}, "delete resource failed");
return undef;
}});