From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 2/3] custom cpu models: do not allow deleting 'reported-model'
Date: Tue, 19 May 2026 16:06:22 +0200 [thread overview]
Message-ID: <20260519140623.594472-3-a.bied-charreton@proxmox.com> (raw)
In-Reply-To: <20260519140623.594472-1-a.bied-charreton@proxmox.com>
Now that reported-model is required on creation, prevent it from being
removed via the delete parameter on PUT.
Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
---
PVE/API2/Cluster/Qemu/CustomCPUModels.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/API2/Cluster/Qemu/CustomCPUModels.pm b/PVE/API2/Cluster/Qemu/CustomCPUModels.pm
index 4ba04180..fdeb2ce3 100644
--- a/PVE/API2/Cluster/Qemu/CustomCPUModels.pm
+++ b/PVE/API2/Cluster/Qemu/CustomCPUModels.pm
@@ -173,6 +173,7 @@ __PACKAGE__->register_method({
if ($delete) {
$delete = [PVE::Tools::split_list($delete)];
die "cannot delete 'cputype'\n" if grep { $_ eq 'cputype' } @$delete;
+ die "cannot delete 'reported-model'\n" if grep { $_ eq 'reported-model' } @$delete;
}
(my $name = $param->{cputype}) =~ s/^custom-//;
--
2.47.3
next prev parent reply other threads:[~2026-05-19 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 14:06 [PATCH manager/qemu-server 0/3] custom cpu models: tighten reported-model handling Arthur Bied-Charreton
2026-05-19 14:06 ` [PATCH pve-manager 1/3] custom cpu models: make 'reported-model' required in POST Arthur Bied-Charreton
2026-05-19 14:06 ` Arthur Bied-Charreton [this message]
2026-05-19 14:06 ` [PATCH qemu-server 3/3] cpu config: resolve default reported-model on write Arthur Bied-Charreton
2026-05-19 14:50 ` [PATCH manager/qemu-server 0/3] custom cpu models: tighten reported-model handling 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=20260519140623.594472-3-a.bied-charreton@proxmox.com \
--to=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