[pve-devel] [PATCH pve-ha-manager 2/7] Sim/RTHardware: use set_service_state from baseclass

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Dec 21 16:38:03 CET 2015


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 src/PVE/HA/Sim/RTHardware.pm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/PVE/HA/Sim/RTHardware.pm b/src/PVE/HA/Sim/RTHardware.pm
index 2148e20..866d0bc 100644
--- a/src/PVE/HA/Sim/RTHardware.pm
+++ b/src/PVE/HA/Sim/RTHardware.pm
@@ -315,17 +315,11 @@ sub set_network_state {
 sub set_service_state {
     my ($self, $sid) = @_;
 
-    $self->{service_config} = $self->read_service_config();
-
     my $d = $self->{service_gui}->{$sid} || die "no such service '$sid'";
-
     my $state = $d->{enable_btn}->get_active() ? 'enabled' : 'disabled';
-    
-    $d = $self->{service_config}->{$sid} || die "no such service '$sid'";
 
-    $d->{state} = $state;
+    $self->{service_config} = $self->SUPER::set_service_state($sid, $state);
 
-    $self->write_service_config($self->{service_config});
 }
 
 sub create_node_control {
-- 
2.1.4





More information about the pve-devel mailing list