Fix typos & change name scheme

This commit is contained in:
NojuHD
2025-02-07 21:41:14 -05:00
parent e6abf236a0
commit 44e53e7e20
2 changed files with 12 additions and 12 deletions
+11 -11
View File
@@ -101,9 +101,9 @@ sub properties {
default => "no"
},
protocol => {
description => "Set storage protocol (1 = iscsi | 2 = scsi | 3 = nvme)",
type => "integer",
default => 1
description => "Set storage protocol ( iscsi | fc | nvme )",
type => "string",
default => "iscsi"
},
};
}
@@ -643,12 +643,12 @@ sub purestorage_resize_volume {
my ( $path, $wwid ) = $class->purestorage_get_wwn( $scfg, $volname );
my $protocol = $scfg->{ protocol };
if ( $protocol == 1 ) {
if ( $protocol eq 'iscsi' ) {
exec_command( [ $cmd->{ iscsiadm }, '--mode', 'node', '--rescan' ], 1 );
} elsif ( $protocol == 2 ) {
} elsif ( $protocol eq 'fc' ) {
scsi_rescan_device( $wwid );
} elsif ( $protocol == 3 ) {
die qq{"Error :: Protocol: "$protocol" isn't implemented yet.\n};
} elsif ( $protocol eq 'nvme' ) {
die qq{Error :: Protocol: "$protocol" isn't implemented yet.\n};
} else {
die qq{Error :: Protocol: "$protocol" isn't a valid protocol.\n};
}
@@ -976,12 +976,12 @@ sub map_volume {
exec_command( [ $cmd->{ multipath }, '-a', $wwid ], 1 );
my $protocol = $scfg->{ protocol };
if ( $protocol == 1 ) {
if ( $protocol eq 'iscsi' ) {
exec_command( [ $cmd->{ iscsiadm }, '--mode', 'session', '--rescan' ], 1 );
} elsif ( $protocol == 2 ) {
} elsif ( $protocol eq 'fc' ) {
scsi_scan_new();
} elsif ( $protocol == 3 ) {
die qq{"Error :: Protocol: "$protocol" isn't implemented yet.\n};
} elsif ( $protocol eq 'nvme' ) {
die qq{Error :: Protocol: "$protocol" isn't implemented yet.\n};
} else {
die qq{Error :: Protocol: "$protocol" isn't a valid protocol.\n};
}
+1 -1
View File
@@ -131,7 +131,7 @@ purestorage: <storage_id>
| vnprefix | (`optional`) The prefix to prepend to name of virtual disks. |
| hgsuffix | (`optional`) A suffix that is appended to the hostname when the plugin interacts with the Pure Storage array. This can help differentiate hosts if necessary. |
| content | Specifies the types of content that can be stored. For virtual machine disk images, use images. |
| protocol | (`optional`, default is `iscsi`) Specifies the storage protocol (1 = iscsi, 2 = scsi) |
| protocol | (`optional`, default is `iscsi`) Specifies the storage protocol (iscsi, fc) |
> **_NOTE:_** Ensure that the token and other sensitive information are kept secure and not exposed publicly.