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

@@ -441,14 +441,9 @@ func (attacher *testPluginAttacher) MountDevice(spec *volume.Spec, devicePath st
if spec == nil {
*attacher.ErrorEncountered = true
klog.Errorf("MountDevice called with nil volume spec")
return fmt.Errorf("MountDevice called with nil volume spec")
return volumetypes.OperationFinished, fmt.Errorf("MountDevice called with nil volume spec")
}
return nil
}
func (attacher *testPluginAttacher) MountDeviceWithStatusTracking(spec *volume.Spec, devicePath string, deviceMountPath string) (volumetypes.OperationStatus, error) {
err := attacher.MountDevice(spec, devicePath, deviceMountPath)
return volumetypes.OperationFinished, err
return volumetypes.OperationFinished, nil
}
// Detacher