[pve-devel] [PATCH v2 ha-manager 03/12] Add update_service_config to HA environment interface

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Sep 30 17:06:38 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/Env.pm      | 6 ++++++
>  src/PVE/HA/Env/PVE2.pm | 6 ++++++
>  src/PVE/HA/Sim/Env.pm  | 6 ++++++
>  3 files changed, 18 insertions(+)
> 
> diff --git a/src/PVE/HA/Env.pm b/src/PVE/HA/Env.pm
> index bb37486..7acd7c5 100644
> --- a/src/PVE/HA/Env.pm
> +++ b/src/PVE/HA/Env.pm
> @@ -87,6 +87,12 @@ sub read_service_config {
>      return $self->{plug}->read_service_config();
>  }
>  
> +sub update_service_config {
> +    my ($self, $digest, $delete, $sid, $param) = @_;

see reply to patch 02/12 regarding parameter order; here I'd even
omit $digest completely, it cannot really matter here anyway, or?

> +
> +    return $self->{plug}->update_service_config($digest, $delete, $sid, $param);
> +}
> +
>  sub parse_sid {
>      my ($self, $sid) = @_;
>  
> diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm
> index 796acd9..1e92687 100644
> --- a/src/PVE/HA/Env/PVE2.pm
> +++ b/src/PVE/HA/Env/PVE2.pm
> @@ -120,6 +120,12 @@ sub read_service_config {
>      return PVE::HA::Config::read_and_check_resources_config();
>  }
>  
> +sub update_service_config {
> +    my ($self, $digest, $delete, $sid, $param) = @_;
> +
> +    return PVE::HA::Config::update_resources_config($digest, $delete, $sid, $param);
> +}
> +
>  sub parse_sid {
>      my ($self, $sid) = @_;
>  
> diff --git a/src/PVE/HA/Sim/Env.pm b/src/PVE/HA/Sim/Env.pm
> index 22e13e6..f400365 100644
> --- a/src/PVE/HA/Sim/Env.pm
> +++ b/src/PVE/HA/Sim/Env.pm
> @@ -203,6 +203,12 @@ sub read_service_config {
>      return $self->{hardware}->read_service_config();
>  }
>  
> +sub update_service_config {
> +    my ($self, $digest, $delete, $sid, $param) = @_;
> +
> +    return $self->{hardware}->update_service_config($digest, $delete, $sid, $param);
> +}
> +
>  sub parse_sid {
>      my ($self, $sid) = @_;
>  
> 





More information about the pve-devel mailing list