From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B41BB986F2 for ; Thu, 11 May 2023 13:30:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9417020468 for ; Thu, 11 May 2023 13:30:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 11 May 2023 13:30:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D72D94195C; Thu, 11 May 2023 13:30:22 +0200 (CEST) Message-ID: <737c8cda-4fed-369a-2a89-4b70fec3f709@proxmox.com> Date: Thu, 11 May 2023 13:30:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Wolfgang Bumiller , =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= , Thomas Lamprecht References: <20230510081829.752401-1-d.csapak@proxmox.com> <1683718319.ft0ifv3hyf.astroid@yuna.none> <20230510135621.7hxaccrdl44albfd@casey.proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20230510135621.7hxaccrdl44albfd@casey.proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [RFC PATCH common] section config: implement array support X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2023 11:30:23 -0000 thanks for your feedback @fabian, @wolfgang! so the consensus seems to be to simply expose the array in the api schema and always have the client send the whole array over, like in pbs updater (not a problem for my series, since in the gui we have the whole info anyway, also if one want a custom api can always be created instead of using the create/updateSchema methods) I'd adapt my patch, and enable arrays in the pve-http-server instead of our '-alist' format (which we only ever use in two places AFAICS) and replace those by an array type (there are a few things that must change in JSONSchema/CLIHandler to fully support arrays, but that's only minor things, such as doing the untainting correctly) i'd then remove support for the '-alist' format completely since it'll not work anymore (at least in the api). FWICT this isn't even a real api change, since the client would send the data in exactly the same way as before, but we'll send the parameters along as arrays instead of \0-separated strings Any other opinions @Thomas? does that work for everybody?