mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cleanup: rename csiID
to driverInstance
The attribute and variable `csiID` ise used for at least two different things: - name of the driver instance, used for journalling metadata - objects of the CSIIdentifier struct, composing a volume-handle By changing the name of the `csiID` attribute for driver instances to `driverInstance`, any confusion should be prevented. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
af0a223edb
commit
ecd15970de
@ -38,16 +38,19 @@ import (
|
||||
type ReclaimSpaceControllerServer struct {
|
||||
*rs.UnimplementedReclaimSpaceControllerServer
|
||||
|
||||
driver string
|
||||
volumeLocks *util.VolumeLocks
|
||||
driverInstance string
|
||||
volumeLocks *util.VolumeLocks
|
||||
}
|
||||
|
||||
// NewReclaimSpaceControllerServer creates a new ReclaimSpaceControllerServer which handles
|
||||
// the ReclaimSpace Service requests from the CSI-Addons specification.
|
||||
func NewReclaimSpaceControllerServer(driver string, volumeLocks *util.VolumeLocks) *ReclaimSpaceControllerServer {
|
||||
func NewReclaimSpaceControllerServer(
|
||||
driverInstance string,
|
||||
volumeLocks *util.VolumeLocks,
|
||||
) *ReclaimSpaceControllerServer {
|
||||
return &ReclaimSpaceControllerServer{
|
||||
driver: driver,
|
||||
volumeLocks: volumeLocks,
|
||||
driverInstance: driverInstance,
|
||||
volumeLocks: volumeLocks,
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +74,7 @@ func (rscs *ReclaimSpaceControllerServer) ControllerReclaimSpace(
|
||||
}
|
||||
defer rscs.volumeLocks.Release(volumeID)
|
||||
|
||||
mgr := rbdutil.NewManager(rscs.driver, nil, req.GetSecrets())
|
||||
mgr := rbdutil.NewManager(rscs.driverInstance, nil, req.GetSecrets())
|
||||
defer mgr.Destroy(ctx)
|
||||
|
||||
rbdVol, err := mgr.GetVolumeByID(ctx, volumeID)
|
||||
|
Reference in New Issue
Block a user