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:
parent
60d1b1cacf
commit
6b68528bc6
@ -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;
|
||||
}});
|
||||
|
Loading…
x
Reference in New Issue
Block a user