From bca617373a371b9ed08be1ba32386afcce86bc33 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 16 Jun 2023 09:35:37 +0200 Subject: [PATCH] schema: explicitly set min/max for vmid option The associated pve_verify_vmid() method already restricts the value to this range, but this wouldn't be visible in the API viewer for example [0]. The verify method is also called by qemu-server's qmextract, so it's not possible to just drop the method right now. [0]: https://forum.proxmox.com/threads/128845/post-564526 Signed-off-by: Fiona Ebner --- src/PVE/JSONSchema.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 60b02cb..7589bba 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -59,8 +59,10 @@ sub get_standard_option { register_standard_option('pve-vmid', { description => "The (unique) ID of the VM.", - type => 'integer', format => 'pve-vmid', - minimum => 1 + type => 'integer', + format => 'pve-vmid', + minimum => 100, + maximum => 999_999_999, }); register_standard_option('pve-node', {