Update Attacher/Detacher interfaces.

- Expand arguments for Attach/Detach interfaces
- Run waitForDetach asynchronously
This commit is contained in:
Sami Wagiaalla
2016-02-19 16:25:01 -05:00
parent fe135fc251
commit 5258392e6a
6 changed files with 20 additions and 26 deletions

View File

@@ -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
}