cleanup: remove unnecessary getArchivedInternalVolumePath func
This commit is contained in:
parent
5756e45f6a
commit
383cb9b8be
@ -243,9 +243,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
|
|||||||
internalVolumePath := getInternalVolumePath(cs.Driver.workingMountDir, nfsVol)
|
internalVolumePath := getInternalVolumePath(cs.Driver.workingMountDir, nfsVol)
|
||||||
|
|
||||||
if strings.EqualFold(nfsVol.onDelete, archive) {
|
if strings.EqualFold(nfsVol.onDelete, archive) {
|
||||||
archivedNfsVol := *nfsVol
|
archivedInternalVolumePath := filepath.Join(getInternalMountPath(cs.Driver.workingMountDir, nfsVol), "archived-"+nfsVol.subDir)
|
||||||
archivedNfsVol.subDir = "archived-" + nfsVol.subDir
|
|
||||||
archivedInternalVolumePath := getArchivedInternalVolumePath(cs.Driver.workingMountDir, nfsVol, &archivedNfsVol)
|
|
||||||
|
|
||||||
// archive subdirectory under base-dir
|
// archive subdirectory under base-dir
|
||||||
klog.V(2).Infof("archiving subdirectory %s --> %s", internalVolumePath, archivedInternalVolumePath)
|
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)
|
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
|
// Given a nfsVolume, return a CSI volume id
|
||||||
func getVolumeIDFromNfsVol(vol *nfsVolume) string {
|
func getVolumeIDFromNfsVol(vol *nfsVolume) string {
|
||||||
idElements := make([]string, totalIDElements)
|
idElements := make([]string, totalIDElements)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user