mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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
|
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()
|
secret := req.GetSecrets()
|
||||||
cr, err := util.NewAdminCredentials(secret)
|
cr, err := util.NewAdminCredentials(secret)
|
||||||
@ -97,7 +97,7 @@ func (cs *Server) CreateVolume(
|
|||||||
}
|
}
|
||||||
defer cr.DeleteCredentials()
|
defer cr.DeleteCredentials()
|
||||||
|
|
||||||
nfsVolume, err := NewNFSVolume(ctx, backend.VolumeId)
|
nfsVolume, err := NewNFSVolume(ctx, backend.GetVolumeId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||||
}
|
}
|
||||||
|
@ -127,12 +127,12 @@ func (nv *NFSVolume) CreateExport(backend *csi.Volume) error {
|
|||||||
if !nv.connected {
|
if !nv.connected {
|
||||||
return fmt.Errorf("can not created export for %q: %w", nv, ErrNotConnected)
|
return fmt.Errorf("can not created export for %q: %w", nv, ErrNotConnected)
|
||||||
}
|
}
|
||||||
|
vctx := backend.GetVolumeContext()
|
||||||
fs := backend.VolumeContext["fsName"]
|
fs := vctx["fsName"]
|
||||||
nfsCluster := backend.VolumeContext["nfsCluster"]
|
nfsCluster := vctx["nfsCluster"]
|
||||||
path := backend.VolumeContext["subvolumePath"]
|
path := vctx["subvolumePath"]
|
||||||
secTypes := backend.VolumeContext["secTypes"]
|
secTypes := vctx["secTypes"]
|
||||||
clients := backend.VolumeContext["clients"]
|
clients := vctx["clients"]
|
||||||
|
|
||||||
err := nv.setNFSCluster(nfsCluster)
|
err := nv.setNFSCluster(nfsCluster)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user