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,
|
ctx context.Context,
|
||||||
req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) {
|
req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) {
|
||||||
// Cephfs doesn't support Block volume
|
// Cephfs doesn't support Block volume
|
||||||
for _, cap := range req.VolumeCapabilities {
|
for _, capability := range req.VolumeCapabilities {
|
||||||
if cap.GetBlock() != nil {
|
if capability.GetBlock() != nil {
|
||||||
return &csi.ValidateVolumeCapabilitiesResponse{Message: ""}, 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")
|
return status.Error(codes.InvalidArgument, "volume Capabilities cannot be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cap := range reqCaps {
|
for _, capability := range reqCaps {
|
||||||
if cap.GetBlock() != nil {
|
if capability.GetBlock() != nil {
|
||||||
return status.Error(codes.Unimplemented, "block volume not supported")
|
return status.Error(codes.Unimplemented, "block volume not supported")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cap := range d.cap {
|
for _, capability := range d.cap {
|
||||||
if c == cap.GetRpc().GetType() {
|
if c == capability.GetRpc().GetType() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user