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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4B6556A26B for ; Thu, 4 Mar 2021 13:52:19 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 498991A61D for ; Thu, 4 Mar 2021 13:52:19 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id B25391A5FB for ; Thu, 4 Mar 2021 13:52:17 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7DFEA462C4 for ; Thu, 4 Mar 2021 13:52:17 +0100 (CET) From: Stefan Reiter To: pve-devel@lists.proxmox.com Date: Thu, 4 Mar 2021 13:52:07 +0100 Message-Id: <20210304125209.24078-6-s.reiter@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210304125209.24078-1-s.reiter@proxmox.com> References: <20210304125209.24078-1-s.reiter@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.024 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 5/7] api: register Qemu::Machine call 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: Thu, 04 Mar 2021 12:52:19 -0000 as 'machine-types', so it is clear this refers to QEMU machines, not the local machine (as one might think, this being a 'node' API call). Signed-off-by: Stefan Reiter --- Requires dependency bump on updated qemu-server. PVE/API2/Nodes.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 8172231e..7a39320a 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -35,6 +35,7 @@ use PVE::API2::Storage::Scan; use PVE::API2::Storage::Status; use PVE::API2::Qemu; use PVE::API2::Qemu::CPU; +use PVE::API2::Qemu::Machine; use PVE::API2::LXC; use PVE::API2::LXC::Status; use PVE::API2::VZDump; @@ -71,6 +72,11 @@ __PACKAGE__->register_method ({ path => 'cpu', }); +__PACKAGE__->register_method ({ + subclass => "PVE::API2::Qemu::Machine", + path => 'machine-types', +}); + __PACKAGE__->register_method ({ subclass => "PVE::API2::LXC", path => 'lxc', -- 2.20.1