public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-container 2/2] fix #5339: api: lxc: ip: add 'all' option so that all addresses can be returned.
Date: Fri, 5 Jul 2024 09:49:17 +0200 (CEST)	[thread overview]
Message-ID: <570171887.742.1720165757760@webmail.proxmox.com> (raw)
In-Reply-To: <ji6ykgwahru3jkmvhng5uzlvkg7ldkiqukienklmdltqk5udis@6ths4oytnnyd>


> Wolfgang Bumiller <w.bumiller@proxmox.com> hat am 05.07.2024 09:45 CEST geschrieben:
> 
>  
> On Tue, Jul 02, 2024 at 04:29:25PM GMT, Fabian Grünbichler 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 => {
> > >  	    node => get_standard_option('pve-node'),
> > >  	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_ctid }),
> > > +	    all => {
> > > +		type => 'boolean',
> > > +		default => 0,
> > > +		optional => 1,
> > > +		description => 'Return all adresses of each interface instead of only one',
> > 
> > typo: s/adresses/addresses
> > 
> > > +	    }
> > >  	},
> > >      },
> > >      returns => {
> > > @@ -2552,12 +2558,14 @@ __PACKAGE__->register_method({
> > >  		},
> > >  		inet => {
> > >  		    type => 'string',
> > > -		    description => 'The IPv4 address of the interface',
> > > +		    format => '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?

the retun schema wouldn't match then for either variant of the call..


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

      reply	other threads:[~2024-07-05  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240418204933.58521-1-jcdra1@gmail.com>
2024-04-18 20:49 ` [pve-devel] [PATCH pve-container 1/2] api: lxc: add 'interfaces' endpoint to the index Johannes Cornelis Draaijer via pve-devel
2024-07-02 14:22   ` [pve-devel] applied: " Fabian Grünbichler
2024-04-18 20:49 ` [pve-devel] [PATCH pve-container 2/2] fix #5339: api: lxc: ip: add 'all' option so that all addresses can be returned Johannes Cornelis Draaijer via pve-devel
2024-07-02 14:29   ` Fabian Grünbichler
2024-07-05  7:45     ` Wolfgang Bumiller
2024-07-05  7:49       ` Fabian Grünbichler [this message]

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=570171887.742.1720165757760@webmail.proxmox.com \
    --to=f.gruenbichler@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