Merge pull request #585 from andyzhangx/remove-getArchivedInternalVolumePath
cleanup: remove unnecessary getArchivedInternalVolumePath func
This commit is contained in:
commit
b501aab6a5
@ -243,9 +243,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
||||
internalVolumePath := getInternalVolumePath(cs.Driver.workingMountDir, nfsVol)
|
||||
|
||||
if strings.EqualFold(nfsVol.onDelete, archive) {
|
||||
archivedNfsVol := *nfsVol
|
||||
archivedNfsVol.subDir = "archived-" + nfsVol.subDir
|
||||
archivedInternalVolumePath := getArchivedInternalVolumePath(cs.Driver.workingMountDir, nfsVol, &archivedNfsVol)
|
||||
archivedInternalVolumePath := filepath.Join(getInternalMountPath(cs.Driver.workingMountDir, nfsVol), "archived-"+nfsVol.subDir)
|
||||
|
||||
// archive subdirectory under base-dir
|
||||
klog.V(2).Infof("archiving subdirectory %s --> %s", internalVolumePath, archivedInternalVolumePath)
|
||||
@ -686,10 +684,6 @@ func getInternalVolumePath(workingMountDir string, vol *nfsVolume) string {
|
||||
return filepath.Join(getInternalMountPath(workingMountDir, vol), vol.subDir)
|
||||
}
|
||||
|
||||
func getArchivedInternalVolumePath(workingMountDir string, vol *nfsVolume, archVol *nfsVolume) string {
|
||||
return filepath.Join(getInternalMountPath(workingMountDir, vol), archVol.subDir)
|
||||
}
|
||||
|
||||
// Given a nfsVolume, return a CSI volume id
|
||||
func getVolumeIDFromNfsVol(vol *nfsVolume) string {
|
||||
idElements := make([]string, totalIDElements)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user