Change signature of MountDevice function and remove MountDeviceWithStatusTracking

This commit is contained in:
Hemant Kumar
2019-11-06 16:29:54 -05:00
parent 0c52b6606e
commit db9ac38592
19 changed files with 118 additions and 143 deletions

View File

@@ -1058,7 +1058,7 @@ func (fv *FakeVolume) GetDeviceMountPath(spec *Spec) (string, error) {
return "", nil
}
func (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath string) error {
func (fv *FakeVolume) mountDeviceInternal(spec *Spec, devicePath string, deviceMountPath string) error {
fv.Lock()
defer fv.Unlock()
if spec.Name() == TimeoutOnMountDeviceVolumeName {
@@ -1086,8 +1086,8 @@ func (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath
return nil
}
func (fv *FakeVolume) MountDeviceWithStatusTracking(spec *Spec, devicePath string, deviceMountPath string) (volumetypes.OperationStatus, error) {
err := fv.MountDevice(spec, devicePath, deviceMountPath)
func (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath string) (volumetypes.OperationStatus, error) {
err := fv.mountDeviceInternal(spec, devicePath, deviceMountPath)
if volumetypes.IsOperationTimeOutError(err) {
return volumetypes.OperationInProgress, err
}