public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage] plugin: move definition for 'port' option to base plugin
Date: Mon, 15 Apr 2024 14:48:37 +0200	[thread overview]
Message-ID: <20240415124838.68905-1-f.ebner@proxmox.com> (raw)

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.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/Storage/PBSPlugin.pm | 6 ------
 src/PVE/Storage/Plugin.pm    | 8 ++++++++
 2 files changed, 8 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..5f49830 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -205,6 +205,14 @@ my $defaultData = {
 	    format => 'pve-storage-options',
 	    optional => 1,
 	},
+	port => {
+	    description => "For PBS/ESXi, use this port to connect to the storage instead of the"
+		." default one.",
+	    type => 'integer',
+	    minimum => 1,
+	    maximum => 65535,
+	    optional => 1,
+	},
     },
 };
 
-- 
2.39.2





             reply	other threads:[~2024-04-15 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 12:48 Fiona Ebner [this message]
2024-04-15 12:48 ` [pve-devel] [PATCH docs] storage: pbs: document port option Fiona Ebner
2024-04-17 14:55   ` [pve-devel] applied: " Thomas Lamprecht
2024-04-17 14:55 ` [pve-devel] [PATCH storage] plugin: move definition for 'port' option to base plugin Thomas Lamprecht
2024-04-18  7:38   ` Fiona Ebner
2024-04-18  8:15     ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415124838.68905-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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