public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 1/7] api: cluster/metricserver: prevent simultaneosly setting and deleting of property
Date: Fri, 4 Dec 2020 12:30:53 +0100	[thread overview]
Message-ID: <4e1b5832-9271-6bab-31c6-d1705afb7409@proxmox.com> (raw)
In-Reply-To: <3434720d-ee6f-9d7d-a365-2a497e27c70f@proxmox.com>

On 12/3/20 10:05 AM, Thomas Lamprecht wrote:
> On 02.12.20 10:21, Dominik Csapak wrote:
>> like we do in other apis of section configs (e.g. storage)
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>>   PVE/API2/Cluster/MetricServer.pm | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/PVE/API2/Cluster/MetricServer.pm b/PVE/API2/Cluster/MetricServer.pm
>> index 9a14985e..ec3c7b75 100644
>> --- a/PVE/API2/Cluster/MetricServer.pm
>> +++ b/PVE/API2/Cluster/MetricServer.pm
>> @@ -213,6 +213,8 @@ __PACKAGE__->register_method ({
>>   		    my $d = $options->{$k} || die "no such option '$k'\n";
>>   		    die "unable to delete required option '$k'\n" if !$d->{optional};
>>   		    die "unable to delete fixed option '$k'\n" if $d->{fixed};
>> +		    die "cannot set and delete property '$k' at the same time!\n"
>> +			if defined($opts->{$k});
>>   
>>   		    delete $data->{$k};
>>   		}
>>
> 
> That counts as API change, strictly speaking..

ok, so should we leave it as is for now?

> For container and VMs we order
> deletions before setting the value, and the one from container is the last
> one which got some actual thoughts and discussion going on, IIRC, albeit not
> to sure if about that exact behavior (as it was probably pre-existing).
> 
> It'd be good to at least decide for one behavior and try making that universal,
> as else this is confusing..
> 

yeah that makes sense (though i think the ordering is irrelevant, since
even in container you cannot set and delete at the same time)




  reply	other threads:[~2020-12-04 11:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02  9:21 [pve-devel] [PATCH common/storage/manager/docs] implement http api for influxdb status plugin Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH common 1/1] tools: add extract_sensitive_params Dominik Csapak
2020-12-03  8:47   ` Thomas Lamprecht
2020-12-03  9:16     ` Wolfgang Bumiller
2020-12-03  9:35       ` Thomas Lamprecht
2020-12-03 15:52   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-02  9:21 ` [pve-devel] [PATCH storage 1/1] api: storage/config: use extract_sensitive_params from tools Dominik Csapak
2021-01-28 16:31   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-02  9:21 ` [pve-devel] [PATCH manager 1/7] api: cluster/metricserver: prevent simultaneosly setting and deleting of property Dominik Csapak
2020-12-03  9:05   ` Thomas Lamprecht
2020-12-04 11:30     ` Dominik Csapak [this message]
2020-12-04 11:57       ` Thomas Lamprecht
2020-12-04 12:45         ` Thomas Lamprecht
2020-12-02  9:21 ` [pve-devel] [PATCH manager 2/7] status/plugin: extend send/_connect/_disconnect/test_connection Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH manager 3/7] status/plugin: extend with add/update/delete hooks Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH manager 4/7] status/influxdb: implement influxdb 2.x http api Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH manager 5/7] status/influxdb: remove unnecessary comment Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH manager 6/7] ui: add necessary fields for influxdb http api Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH manager 7/7] ui: dc/MetricServerView: add onlineHelp to edit windows Dominik Csapak
2020-12-02  9:21 ` [pve-devel] [PATCH docs 1/1] external metrics server: extend docs to explain http api Dominik Csapak
2021-01-28 16:36 ` [pve-devel] applied-series: [PATCH common/storage/manager/docs] implement http api for influxdb status plugin Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e1b5832-9271-6bab-31c6-d1705afb7409@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal