cephfs: replace variable name for builtin cap attribute

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2020-10-19 13:01:11 +05:30 committed by mergify[bot]
parent 01c02b5c02
commit 5b537754a7
3 changed files with 6 additions and 6 deletions

View File

@ -373,8 +373,8 @@ func (cs *ControllerServer) ValidateVolumeCapabilities(
ctx context.Context,
req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) {
// Cephfs doesn't support Block volume
for _, cap := range req.VolumeCapabilities {
if cap.GetBlock() != nil {
for _, capability := range req.VolumeCapabilities {
if capability.GetBlock() != nil {
return &csi.ValidateVolumeCapabilitiesResponse{Message: ""}, nil
}
}

View File

@ -67,8 +67,8 @@ func (cs *ControllerServer) validateCreateVolumeRequest(req *csi.CreateVolumeReq
return status.Error(codes.InvalidArgument, "volume Capabilities cannot be empty")
}
for _, cap := range reqCaps {
if cap.GetBlock() != nil {
for _, capability := range reqCaps {
if capability.GetBlock() != nil {
return status.Error(codes.Unimplemented, "block volume not supported")
}
}

View File

@ -73,8 +73,8 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
return nil
}
for _, cap := range d.cap {
if c == cap.GetRpc().GetType() {
for _, capability := range d.cap {
if c == capability.GetRpc().GetType() {
return nil
}
}