mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
internal: reformat long lines in internal/util package to 120 chars
We have many declarations and invocations..etc with long lines which are very difficult to follow while doing code reading. This address the issues in 'internal/util' package files to restrict the line length to 120 chars. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
8f82a30c21
commit
cc6d67a7d6
@ -27,7 +27,10 @@ func ValidateNodeStageVolumeRequest(req *csi.NodeStageVolumeRequest) error {
|
||||
// validate stagingpath exists
|
||||
ok := checkDirExists(req.GetStagingTargetPath())
|
||||
if !ok {
|
||||
return status.Errorf(codes.InvalidArgument, "staging path %s does not exist on node", req.GetStagingTargetPath())
|
||||
return status.Errorf(
|
||||
codes.InvalidArgument,
|
||||
"staging path %s does not exist on node",
|
||||
req.GetStagingTargetPath())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -83,7 +86,8 @@ func ValidateNodeUnpublishVolumeRequest(req *csi.NodeUnpublishVolumeRequest) err
|
||||
// volume is from source as empty ReadOnlyMany is not supported.
|
||||
func CheckReadOnlyManyIsSupported(req *csi.CreateVolumeRequest) error {
|
||||
for _, capability := range req.GetVolumeCapabilities() {
|
||||
if m := capability.GetAccessMode().Mode; m == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY || m == csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY {
|
||||
if m := capability.GetAccessMode().Mode; m == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
|
||||
m == csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY {
|
||||
if req.GetVolumeContentSource() == nil {
|
||||
return status.Error(codes.InvalidArgument, "readOnly accessMode is supported only with content source")
|
||||
}
|
||||
|
Reference in New Issue
Block a user