From: Fiona Ebner <f.ebner@proxmox.com>
To: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>,
pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server 8/8] api: qemu: Add CRUD handlers for custom CPU models
Date: Mon, 23 Mar 2026 15:46:45 +0100 [thread overview]
Message-ID: <1dd87137-0907-453d-8add-4c4dfdfe73ea@proxmox.com> (raw)
In-Reply-To: <20260312084021.124465-9-a.bied-charreton@proxmox.com>
Am 12.03.26 um 9:40 AM schrieb Arthur Bied-Charreton:
> Add GET handlers for both all custom CPU models and specific ones, POST
> handler for creating custom CPU models, PUT handler for updating them,
> and DELETE handler for deleting them.
>
> Original patches:
> https://lore.proxmox.com/pve-devel/20211028114150.3245864-4-s.reiter@proxmox.com/
> https://lore.proxmox.com/pve-devel/20211028114150.3245864-5-s.reiter@proxmox.com/
>
> Originally-by: Stefan Reiter <s.reiter@proxmox.com>
> Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
> ---
> src/PVE/API2/Qemu/CPU.pm | 236 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 235 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/API2/Qemu/CPU.pm b/src/PVE/API2/Qemu/CPU.pm
> index f8a7e11d..9d89504d 100644
> --- a/src/PVE/API2/Qemu/CPU.pm
> +++ b/src/PVE/API2/Qemu/CPU.pm
> @@ -52,7 +52,7 @@ __PACKAGE__->register_method({
> },
> },
> },
> - links => [{ rel => 'child', href => '{name}' }],
> + links => [{ rel => 'child', href => 'model/{cputype}' }],
Pre-existing issues from the original series:
This does not work in pvesh, because the extract_children() function
there only matches:
if ($href =~ m/^\{(\S+)\}$/) {
Also, it's called 'name' in the returned result, not 'cputype'.
But this is the wrong place for a link to begin with, since we only want
to provide the link for custom models, it should be added to the 'model'
endpoint. There, it is called 'cputype' ;)
Having the 'model' endpoint below here seems wrong to me, for two reasons:
1. Since the 'cpu' endpoint already returns a result other than an index
of sub-endpoints, it cannot at the same time show in its result that the
sub-endpoint exists, and this breaks the directory structure.
2. It's below /nodes/ but it's touching cluster-wide configuration.
I think we should just have a new, dedicated endpoint, maybe
/cluster/qemu/custom-cpu-models? And then, we might want to drop the
need for specifying a 'custom-' prefix when using the calls?
next prev parent reply other threads:[~2026-03-23 14:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 8:40 [PATCH manager/qemu-server 0/8] Add API and UI " Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH pve-manager 1/8] ui: VMCPUFlagSelector: Fix unknownFlags behaviour Arthur Bied-Charreton
2026-03-25 15:57 ` Fiona Ebner
2026-03-26 13:47 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH pve-manager 2/8] ui: CPUModelSelector: Fix dirty state on default Arthur Bied-Charreton
2026-03-26 9:53 ` Fiona Ebner
2026-03-26 14:14 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH pve-manager 3/8] ui: CPUModelSelector: Allow filtering out custom models Arthur Bied-Charreton
2026-03-26 9:59 ` Fiona Ebner
2026-03-26 14:17 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH pve-manager 4/8] ui: Add basic custom CPU model editor Arthur Bied-Charreton
2026-03-26 15:10 ` Fiona Ebner
2026-03-27 9:23 ` Arthur Bied-Charreton
2026-03-27 9:32 ` Fiona Ebner
2026-03-27 9:34 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH pve-manager 5/8] ui: Add CPU flag editor for custom models Arthur Bied-Charreton
2026-03-26 15:22 ` Fiona Ebner
2026-03-27 9:34 ` Arthur Bied-Charreton
2026-03-26 15:40 ` Maximiliano Sandoval
2026-03-27 7:48 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH qemu-server 6/8] qemu: Add helpers for new custom models endpoints Arthur Bied-Charreton
2026-03-20 17:20 ` Fiona Ebner
2026-03-23 6:56 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH qemu-server 7/8] api: qemu: Extend cpu-flags endpoint to return actually supported flags Arthur Bied-Charreton
2026-03-20 17:20 ` Fiona Ebner
2026-03-23 7:25 ` Arthur Bied-Charreton
2026-03-12 8:40 ` [PATCH qemu-server 8/8] api: qemu: Add CRUD handlers for custom CPU models Arthur Bied-Charreton
2026-03-23 14:46 ` Fiona Ebner [this message]
2026-03-23 16:04 ` Arthur Bied-Charreton
2026-03-23 16:10 ` Arthur Bied-Charreton
2026-03-24 9:27 ` Fiona Ebner
2026-03-26 14:54 ` [PATCH manager/qemu-server 0/8] Add API and UI " Fiona Ebner
2026-03-27 13:07 ` Arthur Bied-Charreton
2026-03-27 13:28 ` Fiona Ebner
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=1dd87137-0907-453d-8add-4c4dfdfe73ea@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=a.bied-charreton@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