// initFlexVolumeDriverForUnMount use targetMountDir to initialize FlexVolumeDriver from tag file.
initFlexVolumeDriverForUnMount use targetMountDir to initialize FlexVolumeDriver from tag file.
// initFlexVolumeDriverForUnMount use targetMountDir to initialize FlexVolumeDriver from tag file .
func (d *FlexVolumeDriver) initFlexVolumeDriverForUnMount(targetMountDir string) error {
	var optsData flexvolume.FlexVolumeOptsData
	err := flexvolume.ReadJsonOptsFile(targetMountDir, &optsData)
	if err != nil {
		return err
	}
	d.volId = optsData.GCEPDData.VolumeID
	d.zone = optsData.GCEPDData.Zone
	d.project = optsData.GCEPDData.Project
	return nil
}
func ( d * FlexVolumeDriver ) initFlexVolumeDriverForUnMount ( targetMountDir string ) error { var optsData flexvolume . FlexVolumeOptsData err := flexvolume . ReadJsonOptsFile ( targetMountDir , & optsData ) if err != nil { return err } d . volId = optsData . GCEPDData . VolumeID d . zone = optsData . GCEPDData . Zone d . project = optsData . GCEPDData . Project return nil }
initFlexVolumeDriverForUnMount use targetMountDir to initialize FlexVolumeDriver from tag file.
initFlexVolumeDriverForUnMount use targetMountDir to initialize FlexVolumeDriver from tag file .
// Use the tag file to store volId since flexvolume will execute fresh new binary every time.