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:
Niels de Vos
2025-01-24 13:42:52 +01:00
committed by mergify[bot]
parent af0a223edb
commit ecd15970de
5 changed files with 44 additions and 41 deletions

View File

@ -32,14 +32,14 @@ import (
type EncryptionKeyRotationServer struct {
*ekr.UnimplementedEncryptionKeyRotationControllerServer
driver string
volLock *util.VolumeLocks
driverInstance string
volLock *util.VolumeLocks
}
func NewEncryptionKeyRotationServer(driver string, volLock *util.VolumeLocks) *EncryptionKeyRotationServer {
func NewEncryptionKeyRotationServer(driverInstance string, volLock *util.VolumeLocks) *EncryptionKeyRotationServer {
return &EncryptionKeyRotationServer{
driver: driver,
volLock: volLock,
driverInstance: driverInstance,
volLock: volLock,
}
}
@ -62,7 +62,7 @@ func (ekrs *EncryptionKeyRotationServer) EncryptionKeyRotate(
}
defer ekrs.volLock.Release(volID)
mgr := rbd.NewManager(ekrs.driver, nil, req.GetSecrets())
mgr := rbd.NewManager(ekrs.driverInstance, nil, req.GetSecrets())
defer mgr.Destroy(ctx)
rbdVol, err := mgr.GetVolumeByID(ctx, volID)