From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 494BA1FF2A8 for ; Tue, 2 Jul 2024 16:14:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3319A1FB23; Tue, 2 Jul 2024 16:14:31 +0200 (CEST) Date: Tue, 02 Jul 2024 16:14:24 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20240418083317.36815-1-f.ebner@proxmox.com> In-Reply-To: <20240418083317.36815-1-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1719929653.e75nd7oyjo.astroid@yuna.none> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.051 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Subject: [pve-devel] applied: [PATCH v2 storage] plugin: move definition for 'port' option to base plugin 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On April 18, 2024 10:33 am, Fiona Ebner wrote: > Commit 7020491 ("esxi: add 'port' config parameter") started using > the 'port' option in a second plugin, but the definition stayed in the > PBS plugin. Avoid the hidden dependency and move the definition to the > base plugin instead. > > It is necessary to mark it as optional or it would be required always. > > Clarify that the option is not used by NFS and CIFS. > > Signed-off-by: Fiona Ebner > --- > > Changes in v2: > * do not use a definite list of plugins that use the option > * clarify that NFS and CIFS do not use the option > > src/PVE/Storage/PBSPlugin.pm | 6 ------ > src/PVE/Storage/Plugin.pm | 9 +++++++++ > 2 files changed, 9 insertions(+), 6 deletions(-) > > diff --git a/src/PVE/Storage/PBSPlugin.pm b/src/PVE/Storage/PBSPlugin.pm > index 08ceb88..0808bcc 100644 > --- a/src/PVE/Storage/PBSPlugin.pm > +++ b/src/PVE/Storage/PBSPlugin.pm > @@ -49,12 +49,6 @@ sub properties { > description => "Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.", > type => 'string', > }, > - port => { > - description => "For non default port.", > - type => 'integer', > - minimum => 1, > - maximum => 65535, > - }, > }; > } > > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm > index 22a9729..4c8f672 100644 > --- a/src/PVE/Storage/Plugin.pm > +++ b/src/PVE/Storage/Plugin.pm > @@ -205,6 +205,15 @@ my $defaultData = { > format => 'pve-storage-options', > optional => 1, > }, > + port => { > + description => "Use this port to connect to the storage instead of the default one (for" > + ." example, with PBS or ESXi). For NFS and CIFS, use the 'options' option to" > + ." configure the port via the mount options.", > + type => 'integer', > + minimum => 1, > + maximum => 65535, > + optional => 1, > + }, > }, > }; > > -- > 2.39.2 > > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > > > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel