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 25BA2751F2 for ; Fri, 4 Jun 2021 15:50:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F2E211E077 for ; Fri, 4 Jun 2021 15:50:05 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 B3D621DDA4 for ; Fri, 4 Jun 2021 15:49:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8E62246720 for ; Fri, 4 Jun 2021 15:49:51 +0200 (CEST) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Fri, 4 Jun 2021 15:49:42 +0200 Message-Id: <20210604134946.152720-19-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210604134946.152720-1-f.ebner@proxmox.com> References: <20210604134946.152720-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.001 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches 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. [capabilities.pm, nodes.pm] Subject: [pve-devel] [PATCH manager 08/12] api: move cpu path into qemu/capabilities 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: Fri, 04 Jun 2021 13:50:38 -0000 Signed-off-by: Fabian Ebner --- PVE/API2/Capabilities.pm | 6 ++++++ PVE/API2/Nodes.pm | 7 ------- www/manager6/form/CPUModelSelector.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Capabilities.pm b/PVE/API2/Capabilities.pm index d7e99b55..c88c6c46 100644 --- a/PVE/API2/Capabilities.pm +++ b/PVE/API2/Capabilities.pm @@ -10,6 +10,11 @@ use PVE::API2::Qemu::Machine; use base qw(PVE::RESTHandler); +__PACKAGE__->register_method ({ + subclass => "PVE::API2::Qemu::CPU", + path => 'qemu/cpu', +}); + __PACKAGE__->register_method ({ subclass => "PVE::API2::Qemu::Machine", path => 'qemu/machines', @@ -72,6 +77,7 @@ __PACKAGE__->register_method ({ my ($param) = @_; my $result = [ + { name => 'cpu' }, { name => 'machines' }, ]; diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 369c911c..f4d3382c 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -70,12 +70,6 @@ __PACKAGE__->register_method ({ path => 'qemu', }); -# FIXME: move into capabilities/qemu -__PACKAGE__->register_method ({ - subclass => "PVE::API2::Qemu::CPU", - path => 'cpu', -}); - __PACKAGE__->register_method ({ subclass => "PVE::API2::LXC", path => 'lxc', @@ -228,7 +222,6 @@ __PACKAGE__->register_method ({ { name => 'ceph' }, { name => 'certificates' }, { name => 'config' }, - { name => 'cpu' }, { name => 'disks' }, { name => 'dns' }, { name => 'firewall' }, diff --git a/www/manager6/form/CPUModelSelector.js b/www/manager6/form/CPUModelSelector.js index 225cdaa1..a30dd1fb 100644 --- a/www/manager6/form/CPUModelSelector.js +++ b/www/manager6/form/CPUModelSelector.js @@ -50,7 +50,7 @@ Ext.define('PVE.form.CPUModelSelector', { model: 'PVE.data.CPUModel', proxy: { type: 'proxmox', - url: '/api2/json/nodes/localhost/cpu', + url: '/api2/json/nodes/localhost/capabilities/qemu/cpu', }, sorters: [ { -- 2.30.2