nfs: address golangci-lint issues

addressing golangci-lint issues for
the nfs code.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2024-04-04 10:54:24 +02:00 committed by mergify[bot]
parent 4b7cafe821
commit 48d2e2ce2d
2 changed files with 9 additions and 9 deletions

View File

@ -84,9 +84,9 @@ func (cs *Server) CreateVolume(
return nil, err
}
backend := res.Volume
backend := res.GetVolume()
log.DebugLog(ctx, "CephFS volume created: %s", backend.VolumeId)
log.DebugLog(ctx, "CephFS volume created: %s", backend.GetVolumeId())
secret := req.GetSecrets()
cr, err := util.NewAdminCredentials(secret)
@ -97,7 +97,7 @@ func (cs *Server) CreateVolume(
}
defer cr.DeleteCredentials()
nfsVolume, err := NewNFSVolume(ctx, backend.VolumeId)
nfsVolume, err := NewNFSVolume(ctx, backend.GetVolumeId())
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}

View File

@ -127,12 +127,12 @@ func (nv *NFSVolume) CreateExport(backend *csi.Volume) error {
if !nv.connected {
return fmt.Errorf("can not created export for %q: %w", nv, ErrNotConnected)
}
fs := backend.VolumeContext["fsName"]
nfsCluster := backend.VolumeContext["nfsCluster"]
path := backend.VolumeContext["subvolumePath"]
secTypes := backend.VolumeContext["secTypes"]
clients := backend.VolumeContext["clients"]
vctx := backend.GetVolumeContext()
fs := vctx["fsName"]
nfsCluster := vctx["nfsCluster"]
path := vctx["subvolumePath"]
secTypes := vctx["secTypes"]
clients := vctx["clients"]
err := nv.setNFSCluster(nfsCluster)
if err != nil {