mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Update Attacher/Detacher interfaces.
- Expand arguments for Attach/Detach interfaces - Run waitForDetach asynchronously
This commit is contained in:
@@ -189,12 +189,12 @@ func (plugin *FakeVolumePlugin) NewUnmounter(volName string, podUID types.UID) (
|
||||
return volume, nil
|
||||
}
|
||||
|
||||
func (plugin *FakeVolumePlugin) NewAttacher(spec *Spec) (Attacher, error) {
|
||||
func (plugin *FakeVolumePlugin) NewAttacher() (Attacher, error) {
|
||||
plugin.NewAttacherCallCount = plugin.NewAttacherCallCount + 1
|
||||
return plugin.getFakeVolume(&plugin.Attachers), nil
|
||||
}
|
||||
|
||||
func (plugin *FakeVolumePlugin) NewDetacher(name string, podUID types.UID) (Detacher, error) {
|
||||
func (plugin *FakeVolumePlugin) NewDetacher() (Detacher, error) {
|
||||
plugin.NewDetacherCallCount = plugin.NewDetacherCallCount + 1
|
||||
return plugin.getFakeVolume(&plugin.Detachers), nil
|
||||
}
|
||||
@@ -273,12 +273,12 @@ func (fv *FakeVolume) WaitForAttach(spec *Spec, spectimeout time.Duration) (stri
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (fv *FakeVolume) GetDeviceMountPath(spec *Spec) string {
|
||||
func (fv *FakeVolume) GetDeviceMountPath(host VolumeHost, spec *Spec) string {
|
||||
fv.GetDeviceMountPathCallCount++
|
||||
return ""
|
||||
}
|
||||
|
||||
func (fv *FakeVolume) MountDevice(devicePath string, deviceMountPath string, mounter mount.Interface) error {
|
||||
func (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath string, mounter mount.Interface) error {
|
||||
fv.MountDeviceCallCount++
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user