mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 21:10:22 +00:00
Merge pull request #408 from humblec/validate-paths
Add staging target path validation to nodeserver
This commit is contained in:
commit
e16f246f83
@ -177,6 +177,10 @@ func validateNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) error {
|
||||
return errors.New("target path missing in request")
|
||||
}
|
||||
|
||||
if req.GetStagingTargetPath() == "" {
|
||||
return errors.New("staging target path missing in request")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,6 @@ type NodeServer struct {
|
||||
mounter mount.Interface
|
||||
}
|
||||
|
||||
//TODO remove both stage and unstage methods
|
||||
//once https://github.com/kubernetes-csi/drivers/pull/145 is merged
|
||||
|
||||
// NodePublishVolume mounts the volume mounted to the device path to the target
|
||||
// path
|
||||
func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user