@@ -584,7 +584,7 @@ func (p *Plugin) nodeExpandVolume(
584584
585585 devicePath := publishInfo .DevicePath
586586 if convert .ToBool (publishInfo .LUKSEncryption ) {
587- if ! luks .IsLegacyLUKSDevicePath (devicePath ) {
587+ if ! luks .IsLegacyDevicePath (devicePath ) {
588588 devicePath , err = p .devices .GetLUKSDeviceForMultipathDevice (devicePath )
589589 if err != nil {
590590 Logc (ctx ).WithFields (LogFields {
@@ -1330,7 +1330,7 @@ func (p *Plugin) nodeStageFCPVolume(
13301330 }
13311331
13321332 var luksDevice luks.Device
1333- luksDevice = luks .NewLUKSDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
1333+ luksDevice = luks .NewDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
13341334
13351335 // Ensure we update the passphrase in case it has never been set before
13361336 err = ensureLUKSVolumePassphrase (ctx , p .restClient , luksDevice , volumeId , req .GetSecrets (), true )
@@ -1393,7 +1393,7 @@ func (p *Plugin) nodeUnstageFCPVolume(
13931393 var luksMapperPath string
13941394 fields := LogFields {"device" : publishInfo .DevicePath }
13951395 // Set device path to dm device to correctly verify legacy volumes.
1396- if luks .IsLegacyLUKSDevicePath (publishInfo .DevicePath ) {
1396+ if luks .IsLegacyDevicePath (publishInfo .DevicePath ) {
13971397 luksMapperPath = publishInfo .DevicePath
13981398 dmPath , err := luks .GetDmDevicePathFromLUKSLegacyPath (ctx , p .command ,
13991399 publishInfo .DevicePath )
@@ -1482,7 +1482,7 @@ func (p *Plugin) nodeUnstageFCPVolume(
14821482 }
14831483
14841484 // Set device path to dm device to correctly verify legacy volumes.
1485- if luks .IsLegacyLUKSDevicePath (publishInfo .DevicePath ) {
1485+ if luks .IsLegacyDevicePath (publishInfo .DevicePath ) {
14861486 publishInfo .DevicePath = deviceInfo .MultipathDevice
14871487 }
14881488 }
@@ -1615,16 +1615,16 @@ func (p *Plugin) nodePublishFCPVolume(
16151615 // Rotate the LUKS passphrase if needed, on failure, log and continue to publish
16161616
16171617 var luksDevice luks.Device
1618- if luks .IsLegacyLUKSDevicePath (devicePath ) {
1618+ if luks .IsLegacyDevicePath (devicePath ) {
16191619 // Supports legacy volumes that store the LUKS device path
1620- luksDevice , err = luks .NewLUKSDeviceFromMappingPath (
1620+ luksDevice , err = luks .NewDeviceFromMappingPath (
16211621 ctx , p .command , devicePath , req .VolumeContext ["internalName" ],
16221622 )
16231623 if err != nil {
16241624 return nil , status .Error (codes .Internal , err .Error ())
16251625 }
16261626 } else {
1627- luksDevice = luks .NewLUKSDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
1627+ luksDevice = luks .NewDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
16281628 }
16291629
16301630 err = ensureLUKSVolumePassphrase (ctx , p .restClient , luksDevice , req .GetVolumeId (), req .GetSecrets (), false )
@@ -1782,7 +1782,7 @@ func (p *Plugin) nodeStageISCSIVolume(
17821782 }
17831783
17841784 var luksDevice luks.Device
1785- luksDevice = luks .NewLUKSDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
1785+ luksDevice = luks .NewDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
17861786
17871787 // Ensure we update the passphrase in case it has never been set before
17881788 err = ensureLUKSVolumePassphrase (ctx , p .restClient , luksDevice , volumeId , req .GetSecrets (), true )
@@ -1889,7 +1889,7 @@ func (p *Plugin) nodeUnstageISCSIVolume(
18891889 var luksMapperPath string
18901890 fields := LogFields {"device" : publishInfo .DevicePath }
18911891 // Set device path to dm device to correctly verify legacy volumes.
1892- if luks .IsLegacyLUKSDevicePath (publishInfo .DevicePath ) {
1892+ if luks .IsLegacyDevicePath (publishInfo .DevicePath ) {
18931893 luksMapperPath = publishInfo .DevicePath
18941894 dmPath , err := luks .GetDmDevicePathFromLUKSLegacyPath (ctx , p .command ,
18951895 publishInfo .DevicePath )
@@ -1977,7 +1977,7 @@ func (p *Plugin) nodeUnstageISCSIVolume(
19771977 }
19781978
19791979 // Set device path to dm device to correctly verify legacy volumes.
1980- if luks .IsLegacyLUKSDevicePath (publishInfo .DevicePath ) {
1980+ if luks .IsLegacyDevicePath (publishInfo .DevicePath ) {
19811981 publishInfo .DevicePath = deviceInfo .MultipathDevice
19821982 }
19831983 }
@@ -2152,12 +2152,12 @@ func (p *Plugin) nodePublishISCSIVolume(
21522152 // Rotate the LUKS passphrase if needed, on failure, log and continue to publish
21532153 var luksDevice luks.Device
21542154 var err error
2155- if luks .IsLegacyLUKSDevicePath (devicePath ) {
2155+ if luks .IsLegacyDevicePath (devicePath ) {
21562156 // Supports legacy volumes that store the LUKS device path
2157- luksDevice , err = luks .NewLUKSDeviceFromMappingPath (ctx , p .command , devicePath ,
2157+ luksDevice , err = luks .NewDeviceFromMappingPath (ctx , p .command , devicePath ,
21582158 req .VolumeContext ["internalName" ])
21592159 } else {
2160- luksDevice = luks .NewLUKSDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
2160+ luksDevice = luks .NewDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
21612161 }
21622162
21632163 if err != nil {
@@ -2866,7 +2866,7 @@ func (p *Plugin) nodeStageNVMeVolume(
28662866 }
28672867
28682868 if isLUKS {
2869- luksDevice := luks .NewLUKSDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
2869+ luksDevice := luks .NewDevice (publishInfo .DevicePath , req .VolumeContext ["internalName" ], p .command )
28702870
28712871 // Ensure we update the passphrase in case it has never been set before
28722872 err = ensureLUKSVolumePassphrase (ctx , p .restClient , luksDevice , volumeId , req .GetSecrets (), true )
@@ -3070,7 +3070,7 @@ func (p *Plugin) nodePublishNVMeVolume(
30703070 devicePath := publishInfo .DevicePath
30713071 if convert .ToBool (publishInfo .LUKSEncryption ) {
30723072 // Rotate the LUKS passphrase if needed, on failure, log and continue to publish
3073- luksDevice := luks .NewLUKSDevice (devicePath , req .VolumeContext ["internalName" ], p .command )
3073+ luksDevice := luks .NewDevice (devicePath , req .VolumeContext ["internalName" ], p .command )
30743074
30753075 err = ensureLUKSVolumePassphrase (ctx , p .restClient , luksDevice , req .GetVolumeId (), req .GetSecrets (), false )
30763076 if err != nil {
0 commit comments