From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 1662C1FF0E1 for ; Mon, 27 Jul 2026 16:37:09 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1679C21589; Mon, 27 Jul 2026 16:35:57 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v3 13/17] api2: sort modules and API method registrations Date: Mon, 27 Jul 2026 16:34:37 +0200 Message-ID: <20260727143445.513900-14-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260727143445.513900-1-m.carrara@proxmox.com> References: <20260727143445.513900-1-m.carrara@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1785162877873 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: A4M72H6UXAVEIKYOQEO4W5ZBYSFN2D35 X-Message-ID-Hash: A4M72H6UXAVEIKYOQEO4W5ZBYSFN2D35 X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ... so as to better adhere to our style guide [guide]. [guide] https://pve.proxmox.com/wiki/Perl_Style_Guide#Module_Dependencies Signed-off-by: Max R. Carrara --- PVE/API2.pm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/PVE/API2.pm b/PVE/API2.pm index 0c7e4654..9f1ec961 100644 --- a/PVE/API2.pm +++ b/PVE/API2.pm @@ -3,21 +3,26 @@ package PVE::API2; use strict; use warnings; -use PVE::pvecfg; use PVE::DataCenterConfig; use PVE::GuestHelpers; -use PVE::RESTHandler; use PVE::JSONSchema; +use PVE::RESTHandler; +use PVE::pvecfg; use base qw(PVE::RESTHandler); # preload classes +use PVE::API2::AccessControl; use PVE::API2::Cluster; use PVE::API2::Nodes; use PVE::API2::Pool; -use PVE::API2::AccessControl; use PVE::API2::Storage::Config; +__PACKAGE__->register_method({ + subclass => "PVE::API2::AccessControl", + path => 'access', +}); + __PACKAGE__->register_method({ subclass => "PVE::API2::Cluster", path => 'cluster', @@ -28,21 +33,16 @@ __PACKAGE__->register_method({ path => 'nodes', }); -__PACKAGE__->register_method({ - subclass => "PVE::API2::Storage::Config", - path => 'storage', -}); - -__PACKAGE__->register_method({ - subclass => "PVE::API2::AccessControl", - path => 'access', -}); - __PACKAGE__->register_method({ subclass => "PVE::API2::Pool", path => 'pools', }); +__PACKAGE__->register_method({ + subclass => "PVE::API2::Storage::Config", + path => 'storage', +}); + __PACKAGE__->register_method({ name => 'index', path => '', -- 2.47.3