all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
	"Dominic Jäger" <d.jaeger@proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-common] JSONSchema: Increase vmid option minimum to 100
Date: Mon, 14 Dec 2020 12:52:35 +0100	[thread overview]
Message-ID: <9dbd3c98-1413-23f3-b571-bf393e46140d@proxmox.com> (raw)
In-Reply-To: <20201214102052.76711-1-d.jaeger@proxmox.com>

On 14.12.20 11:20, Dominic Jäger wrote:
> The API standard_option pve-vmid always checks the format pve-vmid. The format
> pve-vmid requires the vmid to be >=100. This is correct, because IDs 1-99 are
> reserved.
> 
> To display this correctly in the API documentation (API viewer, qm man pages),
> we have to set the minimum to 100 in the API standard_option.
> 
> Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
> ---
> https://forum.proxmox.com/threads/qm-importovf-man-page.80632/

IIRC, we use this somewhere, albeit I'm currently not remembering where.

In any case, both Dietmar and I have the feeling that this will break some
things. I'd like to avoid that, maybe you could take another look if you find
some case where values <100 are used for some special handling?

> 
>  src/PVE/JSONSchema.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
> index 29ada5b..b4596d3 100644
> --- a/src/PVE/JSONSchema.pm
> +++ b/src/PVE/JSONSchema.pm
> @@ -58,7 +58,7 @@ sub get_standard_option {
>  register_standard_option('pve-vmid', {
>      description => "The (unique) ID of the VM.",
>      type => 'integer', format => 'pve-vmid',
> -    minimum => 1
> +    minimum => 100,
>  });
>  
>  register_standard_option('pve-node', {
> 






  reply	other threads:[~2020-12-14 11:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 10:20 Dominic Jäger
2020-12-14 11:52 ` Thomas Lamprecht [this message]
2020-12-14 12:33   ` Fabian Grünbichler
2020-12-15  8:11     ` Dominic Jäger
2020-12-15  8:55       ` Thomas Lamprecht

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=9dbd3c98-1413-23f3-b571-bf393e46140d@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=d.jaeger@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal