public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v2 common 2/3] section config: implement array support
Date: Mon, 15 May 2023 11:19:02 +0200	[thread overview]
Message-ID: <cc6b304c-a6c8-b8ef-cfef-30b764cd983e@proxmox.com> (raw)
In-Reply-To: <20230515090757.2azfd7aw4v5zn4gr@casey.proxmox.com>

On 5/15/23 11:07, Wolfgang Bumiller wrote:
> On Fri, May 12, 2023 at 02:23:49PM +0200, Dominik Csapak wrote:
>> enables section configs in the style of:
>>
>> ----
>> type: id
>>      property value
>>      property value2
>>      property value3
>> ----
>>
>> can be combined with property strings
>>
>> the provided create and update schema just pass through the array type
>> to the api, so the api call must always contain the complete array
>>
>> also adds a test case for such array fields
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>> changes from v1:
>> * don't special encode arrays anymore, but instead have always the whole
>>    array as parameter in the create/updateSchema
>>   src/PVE/SectionConfig.pm    | 64 +++++++++++++++++++++++++++----------
>>   test/section_config_test.pl | 26 +++++++++++++++
>>   2 files changed, 74 insertions(+), 16 deletions(-)
>>
>> diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm
>> index f36cede..03f6a52 100644
>> --- a/src/PVE/SectionConfig.pm
>> +++ b/src/PVE/SectionConfig.pm
>> @@ -51,6 +51,17 @@ sub plugindata {
>>       return {};
>>   }
>>   
>> +my $copy_property = sub {
> 
> If you're moving it, maybe *re*move it and change the single
> caller of it to just do `{ %$src }`, since that's all this does ;-)
> 

oops, i used it in the v1, now not anymore, forgot to remove the hunks ;)
but can do in a v3 as a separate patch





  reply	other threads:[~2023-05-15  9:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 12:23 [pve-devel] [PATCH common/manager/http/guest/qemu-server] schema/config " Dominik Csapak
2023-05-12 12:23 ` [pve-devel] [PATCH common 1/3] JSONSchema: add support for array parameter in api calls, cli and config Dominik Csapak
2023-06-05  8:36   ` Wolfgang Bumiller
2023-05-12 12:23 ` [pve-devel] [PATCH v2 common 2/3] section config: implement array support Dominik Csapak
2023-05-15  9:07   ` Wolfgang Bumiller
2023-05-15  9:19     ` Dominik Csapak [this message]
2023-05-12 12:23 ` [pve-devel] [PATCH common 3/3] JSONSchema: disable '-alist' format Dominik Csapak
2023-06-05  8:36   ` Wolfgang Bumiller
2023-05-12 12:23 ` [pve-devel] [PATCH manager 1/1] vzdump: prepare 'exclude-path' for array format Dominik Csapak
2023-06-05  7:36   ` Wolfgang Bumiller
2023-06-05  7:54     ` Dominik Csapak
2023-06-05  7:59       ` Wolfgang Bumiller
2023-06-05  8:03   ` [pve-devel] applied: " Wolfgang Bumiller
2023-05-12 12:23 ` [pve-devel] [PATCH http-server 1/2] proxy request: forward json content type and parameters Dominik Csapak
2023-06-05  8:42   ` Wolfgang Bumiller
2023-05-12 12:23 ` [pve-devel] [PATCH http-server 2/2] use proper arrays for array parameter Dominik Csapak
2023-05-12 12:23 ` [pve-devel] [PATCH guest-common 1/1] vzdump: change 'exclude-path' from alist to an array format Dominik Csapak
2023-06-05  8:37   ` [pve-devel] [PATCH guest-common 1/1] vzdump: change 'exclude-path' from alist to an array formaty Wolfgang Bumiller
2023-05-12 12:23 ` [pve-devel] [PATCH qemu-server 1/1] api: switch agent api call to 'array' type Dominik Csapak
2023-06-05  8:38   ` Wolfgang Bumiller

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=cc6b304c-a6c8-b8ef-cfef-30b764cd983e@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=w.bumiller@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