Refactor BlockVolumeMapper and BlockVolumeUnmapper interface

- Rename MapDevice to MapPodDevice in BlockVolumeMapper
- Add UnmapPodDevice in BlockVolumeUnmapper (This will be used by csi driver later)
- Add CustomBlockVolumeMapper and CustomBlockVolumeUnmapper interface
- Move SetUpDevice and MapPodDevice to CustomBlockVolumeMapper
- Move TearDownDevice and UnmapPodDevice to CustomBlockVolumeUnmapper
- Implement CustomBlockVolumeMapper only in local and csi plugin
- Implement CustomBlockVolumeUnmapper only in fc, iscsi, rbd, and csi plugin
- Change MapPodDevice to return path and SetUpDevice not to return path
This commit is contained in:
Masaki Kimura
2019-11-04 20:01:37 +00:00
parent 27067540ff
commit f363a03f0b
18 changed files with 202 additions and 223 deletions

View File

@@ -555,10 +555,14 @@ func (f *stubBlockVolume) SetUpDevice() (string, error) {
return "", nil
}
func (f stubBlockVolume) MapDevice(devicePath, globalMapPath, volumeMapPath, volumeMapName string, podUID types.UID) error {
func (f stubBlockVolume) MapPodDevice() error {
return nil
}
func (f *stubBlockVolume) TearDownDevice(mapPath string, devicePath string) error {
return nil
}
func (f *stubBlockVolume) UnmapPodDevice() error {
return nil
}