From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 5BDE71FF2CE
	for <inbox@lore.proxmox.com>; Fri,  5 Jul 2024 09:45:59 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id D5F503D524;
	Fri,  5 Jul 2024 09:46:16 +0200 (CEST)
Date: Fri, 5 Jul 2024 09:45:43 +0200
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Fabian =?utf-8?Q?Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Message-ID: <ji6ykgwahru3jkmvhng5uzlvkg7ldkiqukienklmdltqk5udis@6ths4oytnnyd>
References: <20240418204933.58521-1-jcdra1@gmail.com>
 <mailman.710.1713473387.450.pve-devel@lists.proxmox.com>
 <1042471210.2938.1719930565011@webmail.proxmox.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <1042471210.2938.1719930565011@webmail.proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.087 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
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [lxc.pm]
Subject: Re: [pve-devel] [PATCH pve-container 2/2] fix #5339: api: lxc: ip:
 add 'all' option so that all addresses can be returned.
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

On Tue, Jul 02, 2024 at 04:29:25PM GMT, Fabian Gr=FCnbichler wrote:
> apologies again for the long delay!
> =

> > Johannes Cornelis Draaijer via pve-devel <pve-devel@lists.proxmox.com> =
hat am 18.04.2024 22:49 CEST geschrieben:
> =

> > Signed-off-by: Johannes Cornelis Draaijer <jcdra1@gmail.com>
> > ---
> >  src/PVE/API2/LXC.pm | 16 +++++++++++++---
> >  src/PVE/LXC.pm      |  9 +++++++--
> >  2 files changed, 20 insertions(+), 5 deletions(-)
> > =

> > diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
> > index 89ba64c..3561317 100644
> > --- a/src/PVE/API2/LXC.pm
> > +++ b/src/PVE/API2/LXC.pm
> > @@ -2533,6 +2533,12 @@ __PACKAGE__->register_method({
> >  	properties =3D> {
> >  	    node =3D> get_standard_option('pve-node'),
> >  	    vmid =3D> get_standard_option('pve-vmid', { completion =3D> \&PVE=
::LXC::complete_ctid }),
> > +	    all =3D> {
> > +		type =3D> 'boolean',
> > +		default =3D> 0,
> > +		optional =3D> 1,
> > +		description =3D> 'Return all adresses of each interface instead of o=
nly one',
> =

> typo: s/adresses/addresses
> =

> > +	    }
> >  	},
> >      },
> >      returns =3D> {
> > @@ -2552,12 +2558,14 @@ __PACKAGE__->register_method({
> >  		},
> >  		inet =3D> {
> >  		    type =3D> 'string',
> > -		    description =3D> 'The IPv4 address of the interface',
> > +		    format =3D> 'CIDRv4-list',
> =

> this format here and the code below don't agree. a string type with the -=
list suffix needs actually be a string with the list elements delimited by =
either space, ',' or ';'. in this case, comma or semicolon is probably okay.
> =


Since the caller needs to specify a new parameter, shouldn't we just
return an actual array instead?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel