From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 711991FF0AF for ; Fri, 06 Nov 2026 16:48:42 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 265F421712; Fri, 06 Nov 2026 16:47:05 +0100 (CET) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v4 13/17] api: sort modules and API method registrations Date: Fri, 6 Nov 2026 16:45:49 +0100 Message-ID: <20261106154554.2182986-14-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261106154554.2182986-1-m.carrara@proxmox.com> References: <20261106154554.2182986-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: 1793979982197 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.324 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_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 Message-ID-Hash: T3O54IHDL45O2LUBOC53KQKP5VARM65X X-Message-ID-Hash: T3O54IHDL45O2LUBOC53KQKP5VARM65X 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 CC: Alfonso Kuen , Thomas Ellmenreich , Jakob Klocker 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]. Note that this also changes the order of the entries in the API's root directory index ('GET /'), as it lists the registered subdirectories in registration order. [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 @@ -1,50 +1,50 @@ 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', }); __PACKAGE__->register_method({ subclass => "PVE::API2::Nodes", 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 => '', method => 'GET', permissions => { user => 'all' }, -- 2.47.3