public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 storage] plugin: move definition for 'port' option to base plugin
@ 2024-04-18  8:33 Fiona Ebner
  2024-07-02 14:14 ` [pve-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2024-04-18  8:33 UTC (permalink / raw)
  To: pve-devel

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 <f.ebner@proxmox.com>
---

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-02 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  8:33 [pve-devel] [PATCH v2 storage] plugin: move definition for 'port' option to base plugin Fiona Ebner
2024-07-02 14:14 ` [pve-devel] applied: " Fabian Grünbichler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal