mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
cephfs: replace variable name for builtin cap
attribute
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
01c02b5c02
commit
5b537754a7
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user