[pve-devel] [PATCH v1 pve-common 13/18] pbsclient: make method `password_file_name` public

Max Carrara m.carrara at proxmox.com
Fri Aug 2 15:26:51 CEST 2024


.. in order to allow users to only store a password if the password
file doesn't exist yet, for example.

Also adds corresponding documentation.

Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
 src/PVE/PBSClient.pm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm
index e7e9a79..a701542 100644
--- a/src/PVE/PBSClient.pm
+++ b/src/PVE/PBSClient.pm
@@ -181,7 +181,18 @@ sub new {
     return $self;
 }
 
-my sub password_file_name {
+=pod
+
+=head3 password_file_name
+
+    $file_name = $client->password_file_name()
+
+Returns the full name of the I<password> file, including the path of the
+I<secret directory> it is located in.
+
+=cut
+
+sub password_file_name {
     my ($self) = @_;
 
     return File::Spec->catfile($self->{secret_dir}, "$self->{storeid}.pw");
-- 
2.39.2





More information about the pve-devel mailing list