[pve-devel] [PATCH v2 ha-manager 04/12] Implement update_service_config for simulation
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Sep 30 17:07:36 CEST 2019
On 9/30/19 9:22 AM, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> src/PVE/HA/Sim/Hardware.pm | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm
> index 8bd5cbd..d2c0ec0 100644
> --- a/src/PVE/HA/Sim/Hardware.pm
> +++ b/src/PVE/HA/Sim/Hardware.pm
> @@ -109,6 +109,22 @@ sub read_service_config {
> return $conf;
> }
>
> +sub update_service_config {
> + my ($self, $digest, $delete, $sid, $param) = @_;
> +
> + die "not implemented" if ($digest || $delete);
and not required if we agree with my points from 02/12 and 03/12 replies :)
(at least the digest one)
> +
> + 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) = @_;
>
>
More information about the pve-devel
mailing list