func (a *attacherDefaults) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string, mounter mount.Interface) error {
	klog.Warning(logPrefix(a.plugin.flexVolumePlugin), "using default MountDevice for volume ", spec.Name(), ", device ", devicePath, ", deviceMountPath ", deviceMountPath)

	volSourceFSType, err := getFSType(spec)
	if err != nil {
		return err
	}

	readOnly, err := getReadOnly(spec)
	if err != nil {
		return err
	}

	options := make([]string, 0)

	if readOnly {
		options = append(options, "ro")
	} else {
		options = append(options, "rw")
	}

	diskMounter := &mount.SafeFormatAndMount{Interface: mounter, Exec: a.plugin.host.GetExec(a.plugin.GetPluginName())}

	return diskMounter.FormatAndMount(devicePath, deviceMountPath, volSourceFSType, options)
}
// MountDevice is part of the volume.Attacher interface
MountDevice is part of the volume.Attacher interface
// MountDevice is part of the volume . Attacher interface
func (a *attacherDefaults) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string, mounter mount.Interface) error {
	klog.Warning(logPrefix(a.plugin.flexVolumePlugin), "using default MountDevice for volume ", spec.Name(), ", device ", devicePath, ", deviceMountPath ", deviceMountPath)
	volSourceFSType, err := getFSType(spec)
	if err != nil {
		return err
	}
	readOnly, err := getReadOnly(spec)
	if err != nil {
		return err
	}
	options := make([]string, 0)
	if readOnly {
		options = append(options, "ro")
	} else {
		options = append(options, "rw")
	}
	diskMounter := &mount.SafeFormatAndMount{Interface: mounter, Exec: a.plugin.host.GetExec(a.plugin.GetPluginName())}
	return diskMounter.FormatAndMount(devicePath, deviceMountPath, volSourceFSType, options)
}
func ( a * attacherDefaults ) MountDevice ( spec * volume . Spec , devicePath string , deviceMountPath string , mounter mount . Interface ) error { klog . Warning ( logPrefix ( a . plugin . flexVolumePlugin ) , " " , spec . Name ( ) , " " , devicePath , " " , deviceMountPath ) volSourceFSType , err := getFSType ( spec ) if err != nil { return err } readOnly , err := getReadOnly ( spec ) if err != nil { return err } options := make ( [ ] string , 0 ) if readOnly { options = append ( options , " " ) } else { options = append ( options , " " ) } diskMounter := & mount . SafeFormatAndMount { Interface : mounter , Exec : a . plugin . host . GetExec ( a . plugin . GetPluginName ( ) ) } return diskMounter . FormatAndMount ( devicePath , deviceMountPath , volSourceFSType , options ) }
MountDevice is part of the volume.Attacher interface
MountDevice is part of the volume . Attacher interface