From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 680EB60ABB for ; Tue, 1 Dec 2020 10:34:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 60674EF31 for ; Tue, 1 Dec 2020 10:34:52 +0100 (CET) Received: from sara.proxmox.com (212-186-127-178.static.upcbusiness.at [212.186.127.178]) by firstgate.proxmox.com (Proxmox) with ESMTP id F38B5EF29 for ; Tue, 1 Dec 2020 10:34:51 +0100 (CET) Received: by sara.proxmox.com (Postfix, from userid 1000) id CA8D7349046; Tue, 1 Dec 2020 10:34:51 +0100 (CET) From: Moayad Almalat To: pve-devel@pve.proxmox.com Date: Tue, 1 Dec 2020 10:34:50 +0100 Message-Id: <20201201093450.101063-1-m.almalat@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL 0.132 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.399 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [cluster.pm] Subject: [pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 09:34:52 -0000 When call /cluster/nextid over API, it returns ID as a string format like {"data":"100"}. in the API pve-viewer, the result type is an integer format. Signed-off-by: Moayad Almalat --- PVE/API2/Cluster.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index bf0e3b4d..ab07b491 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -727,7 +727,7 @@ __PACKAGE__->register_method({ } for (my $i = 100; $i < 10000; $i++) { - return $i if !defined($idlist->{$i}); + return int($i) if !defined($idlist->{$i}); } die "unable to get any free VMID\n"; -- 2.20.1