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 <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-06-16 09:35:37 +02:00 committed by Thomas Lamprecht
parent bc24aad316
commit bca617373a

View File

@ -59,8 +59,10 @@ sub get_standard_option {
register_standard_option('pve-vmid', { register_standard_option('pve-vmid', {
description => "The (unique) ID of the VM.", description => "The (unique) ID of the VM.",
type => 'integer', format => 'pve-vmid', type => 'integer',
minimum => 1 format => 'pve-vmid',
minimum => 100,
maximum => 999_999_999,
}); });
register_standard_option('pve-node', { register_standard_option('pve-node', {