Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit 4250583

Browse files
committed
Update Detach() and IsAttached() to call deriveVolumeOCID
1 parent 1512445 commit 4250583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/oci/driver/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (d OCIFlexvolumeDriver) Detach(pvOrVolumeName, nodeName string) flexvolume.
138138
return flexvolume.Fail(err)
139139
}
140140

141-
volumeOCID := fmt.Sprintf(volumeOCIDTemplate, c.GetConfig().Auth.RegionKey, pvOrVolumeName)
141+
volumeOCID := deriveVolumeOCID(c.GetConfig().Auth.RegionKey, pvOrVolumeName)
142142
attachment, err := c.FindVolumeAttachment(volumeOCID)
143143
if err != nil {
144144
return flexvolume.Fail(err)
@@ -171,7 +171,7 @@ func (d OCIFlexvolumeDriver) IsAttached(opts flexvolume.Options, nodeName string
171171
return flexvolume.Fail(err)
172172
}
173173

174-
volumeOCID := fmt.Sprintf(volumeOCIDTemplate, c.GetConfig().Auth.RegionKey, opts["kubernetes.io/pvOrVolumeName"])
174+
volumeOCID := deriveVolumeOCID(c.GetConfig().Auth.RegionKey, opts["kubernetes.io/pvOrVolumeName"])
175175
attachment, err := c.FindVolumeAttachment(volumeOCID)
176176
if err != nil {
177177
return flexvolume.DriverStatus{

0 commit comments

Comments
 (0)