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 0495F1FF0B3 for ; Thu, 26 Nov 2026 16:39:50 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E9A3021734; Thu, 26 Nov 2026 16:39:40 +0100 (CET) From: Lukas Sichert To: pve-devel@lists.proxmox.com Subject: [PATCH network v3 1/7] style: zones: use fully qualified JSONSchema calls for standard options Date: Thu, 26 Nov 2026 16:28:59 +0100 Message-ID: <20261126153925.54600-2-l.sichert@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261126153925.54600-1-l.sichert@proxmox.com> References: <20261126153925.54600-1-l.sichert@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795707575067 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.430 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: UXPKQNHJDXBCJHZNVZVN7WWVUDIXTQ5N X-Message-ID-Hash: UXPKQNHJDXBCJHZNVZVN7WWVUDIXTQ5N X-MailFrom: l.sichert@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: Lukas Sichert X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Drop the redundant get_standard_option import and call the helper through PVE::JSONSchema directly. Reorder the remaining module imports alphabetically. Signed-off-by: Lukas Sichert --- Notes: new in v3 src/PVE/Network/SDN/Zones.pm | 12 ++++++------ src/PVE/Network/SDN/Zones/Plugin.pm | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/PVE/Network/SDN/Zones.pm b/src/PVE/Network/SDN/Zones.pm index e4116d7..6981c27 100644 --- a/src/PVE/Network/SDN/Zones.pm +++ b/src/PVE/Network/SDN/Zones.pm @@ -6,25 +6,25 @@ use warnings; use JSON; use Storable qw(dclone); -use PVE::Exception qw(raise_param_exc); -use PVE::Tools qw(extract_param dir_glob_regex run_command); use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file); +use PVE::Exception qw(raise_param_exc); use PVE::IPRoute2; use PVE::Network; use PVE::RESTEnvironment qw(log_warn); +use PVE::Tools qw(extract_param dir_glob_regex run_command); use PVE::Network::SDN::Controllers; use PVE::Network::SDN::Dns; use PVE::Network::SDN::Fabrics; use PVE::Network::SDN::Ipams; use PVE::Network::SDN::Vnets; -use PVE::Network::SDN::Zones::VlanPlugin; -use PVE::Network::SDN::Zones::QinQPlugin; -use PVE::Network::SDN::Zones::VxlanPlugin; use PVE::Network::SDN::Zones::EvpnPlugin; use PVE::Network::SDN::Zones::FaucetPlugin; -use PVE::Network::SDN::Zones::SimplePlugin; use PVE::Network::SDN::Zones::Plugin; +use PVE::Network::SDN::Zones::QinQPlugin; +use PVE::Network::SDN::Zones::SimplePlugin; +use PVE::Network::SDN::Zones::VlanPlugin; +use PVE::Network::SDN::Zones::VxlanPlugin; PVE::Network::SDN::Zones::VlanPlugin->register(); PVE::Network::SDN::Zones::QinQPlugin->register(); diff --git a/src/PVE/Network/SDN/Zones/Plugin.pm b/src/PVE/Network/SDN/Zones/Plugin.pm index 3fa2ab5..795ec9f 100644 --- a/src/PVE/Network/SDN/Zones/Plugin.pm +++ b/src/PVE/Network/SDN/Zones/Plugin.pm @@ -1,17 +1,16 @@ package PVE::Network::SDN::Zones::Plugin; +use Net::IP qw(ip_get_version); use strict; use warnings; -use PVE::Tools qw(run_command); -use Net::IP qw(ip_get_version); -use PVE::JSONSchema; use PVE::Cluster; +use PVE::JSONSchema; use PVE::Network; use PVE::Network::SDN::Formats; use PVE::RS::SDN; +use PVE::Tools qw(run_command); -use PVE::JSONSchema qw(get_standard_option); use base qw(PVE::SectionConfig); PVE::Cluster::cfs_register_file( @@ -105,7 +104,7 @@ my $defaultData = { format => 'pve-configid', type => 'string', }, - nodes => get_standard_option('pve-node-list', { optional => 1 }), + nodes => PVE::JSONSchema::get_standard_option('pve-node-list', { optional => 1 }), route => { type => 'array', optional => 1, @@ -117,7 +116,7 @@ my $defaultData = { format => 'pve-sdn-static-route', }, }, - zone => get_standard_option( + zone => PVE::JSONSchema::get_standard_option( 'pve-sdn-zone-id', { completion => \&PVE::Network::SDN::Zones::complete_sdn_zone, -- 2.47.3