[pve-devel] [PATCH v3 ha-manager 3/9] Implement update_service_config for simulation

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Oct 4 17:23:44 CEST 2019


On 10/2/19 11:46 AM, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  src/PVE/HA/Sim/Hardware.pm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm
> index 9c0ad05..3cdc85b 100644
> --- a/src/PVE/HA/Sim/Hardware.pm
> +++ b/src/PVE/HA/Sim/Hardware.pm
> @@ -109,6 +109,20 @@ sub read_service_config {
>      return $conf;
>  }
>  
> +sub update_service_config {
> +    my ($self, $sid, $param) = @_;
> +
> +    my $conf = $self->read_service_config();
> +
> +    my $sconf = $conf->{$sid} || die "no such resource '$sid'\n";
> +
> +    foreach my $k (%$param) {
> +	$sconf->{$k} = $param->{$k};
> +    }
> +
> +    $self->write_service_config($conf);
> +}
> +
>  sub write_service_config {
>      my ($self, $conf) = @_;
>  
> 

please rebase this and squash into 2/9, it belongs together




More information about the pve-devel mailing list