[pve-devel] [RFC pve-storage 23/36] plugin: esxi: make helper subroutines private

Max Carrara m.carrara at proxmox.com
Wed Jul 17 11:40:21 CEST 2024


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

diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index a35693d..d4b6afc 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -59,12 +59,12 @@ sub options {
    };
 }
 
-sub esxi_cred_file_name {
+my sub esxi_cred_file_name {
     my ($storeid) = @_;
     return "/etc/pve/priv/storage/${storeid}.pw";
 }
 
-sub esxi_delete_credentials {
+my sub esxi_delete_credentials {
     my ($storeid) = @_;
 
     if (my $cred_file = get_cred_file($storeid)) {
@@ -72,7 +72,7 @@ sub esxi_delete_credentials {
     }
 }
 
-sub esxi_set_credentials {
+my sub esxi_set_credentials {
     my ($password, $storeid) = @_;
 
     my $cred_file = esxi_cred_file_name($storeid);
@@ -83,7 +83,7 @@ sub esxi_set_credentials {
     return $cred_file;
 }
 
-sub get_cred_file {
+my sub get_cred_file {
     my ($storeid) = @_;
 
     my $cred_file = esxi_cred_file_name($storeid);
@@ -267,7 +267,7 @@ sub esxi_unmount : prototype($$$) {
 }
 
 # Split a path into (datacenter, datastore, path)
-sub split_path : prototype($) {
+my sub split_path : prototype($) {
     my ($path) = @_;
     if ($path =~ m!^([^/]+)/([^/]+)/(.+)$!) {
 	return ($1, $2, $3);
@@ -752,7 +752,7 @@ sub vmx_path { $_[0]->{'pve.vmx.path'} }
 sub manifest { $_[0]->{'pve.manifest'} }
 
 # (Also used for the fileName config key...)
-sub is_disk_entry : prototype($) {
+my sub is_disk_entry : prototype($) {
     my ($id) = @_;
     if ($id =~ /^(scsi|ide|sata|nvme)(\d+:\d+)(:?\.fileName)?$/) {
 	return ($1, $2);
-- 
2.39.2





More information about the pve-devel mailing list