mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
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:
parent
4b7cafe821
commit
48d2e2ce2d
@ -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())
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user