mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
rbd: add ReadWriteOncePod in accessModeStrToInt() conversion function
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
aa698bc3e1
commit
87beaac25b
@ -34,7 +34,7 @@ const (
|
||||
)
|
||||
|
||||
// accessModeStrToInt convert access mode type string to int32.
|
||||
// Makesure to update this function as and when there are new modes introduced.
|
||||
// Make sure to update this function as and when there are new modes introduced.
|
||||
func accessModeStrToInt(mode v1.PersistentVolumeAccessMode) csi.VolumeCapability_AccessMode_Mode {
|
||||
switch mode {
|
||||
case v1.ReadWriteOnce:
|
||||
@ -43,6 +43,8 @@ func accessModeStrToInt(mode v1.PersistentVolumeAccessMode) csi.VolumeCapability
|
||||
return csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY
|
||||
case v1.ReadWriteMany:
|
||||
return csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER
|
||||
case v1.ReadWriteOncePod:
|
||||
return csi.VolumeCapability_AccessMode_SINGLE_NODE_SINGLE_WRITER
|
||||
}
|
||||
|
||||
return csi.VolumeCapability_AccessMode_UNKNOWN
|
||||
|
Loading…
Reference in New Issue
Block a user