From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel] applied: [PATCH container] config list helper: fix return type of vmid for container index API enpoint
Date: Thu, 11 Apr 2024 15:29:18 +0200 [thread overview]
Message-ID: <1712842150.sbdhvwxkfd.astroid@yuna.none> (raw)
In-Reply-To: <20231205113532.58166-1-f.ebner@proxmox.com>
On December 5, 2023 12:35 pm, Fiona Ebner wrote:
> The schema declares it to be an integer. Done in the config_list()
> helper, to ensure consistency for the following existing code in
> vmstatus():
>
>> my $list = $opt_vmid ? { $opt_vmid => { type => 'lxc', vmid => int($opt_vmid) }} : config_list();
>
> Should not cause any issues for other callers of the helper.
>
> Reported in the community forum:
> https://forum.proxmox.com/threads/137628/
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> src/PVE/LXC.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 7883cfb..4fb4ef2 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -69,7 +69,7 @@ sub config_list {
> my $d = $ids->{$vmid};
> next if !$d->{node} || $d->{node} ne $nodename;
> next if !$d->{type} || $d->{type} ne 'lxc';
> - $res->{$vmid} = { type => 'lxc', vmid => $vmid };
> + $res->{$vmid} = { type => 'lxc', vmid => int($vmid) };
> }
> return $res;
> }
> --
> 2.39.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
prev parent reply other threads:[~2024-04-11 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 11:35 [pve-devel] " Fiona Ebner
2024-04-11 11:57 ` Fiona Ebner
2024-04-11 13:29 ` 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=1712842150.sbdhvwxkfd.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.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