// initFlexVolumeDriverForMount parse user provided jsonOptions to initialize FlexVolumeDriver.
initFlexVolumeDriverForMount parse user provided jsonOptions to initialize FlexVolumeDriver.
// initFlexVolumeDriverForMount parse user provided jsonOptions to initialize FlexVolumeDriver .
func (d *FlexVolumeDriver) initFlexVolumeDriverForMount(jsonOptions string) error {
	var volOptions map[string]interface{}
	json.Unmarshal([]byte(jsonOptions), &volOptions)
	if len(volOptions[flexvolume.VolIdKey].(string)) == 0 || len(volOptions[flexvolume.SystemFsTypeKey].(string)) == 0 || len(volOptions[flexvolume.ZoneKey].(string)) == 0 || len(volOptions[flexvolume.ProjectKey].(string)) == 0 {
		return fmt.Errorf("jsonOptions is not set by user properly: %#v", jsonOptions)
	}
	d.volId = volOptions[flexvolume.VolIdKey].(string)
	d.fsType = volOptions[flexvolume.SystemFsTypeKey].(string)
	d.zone = volOptions[flexvolume.ZoneKey].(string)
	d.project = volOptions[flexvolume.ProjectKey].(string)
	return nil
}
func ( d * FlexVolumeDriver ) initFlexVolumeDriverForMount ( jsonOptions string ) error { var volOptions map [ string ] interface { } json . Unmarshal ( [ ] byte ( jsonOptions ) , & volOptions ) if len ( volOptions [ flexvolume . VolIdKey ] . ( string ) ) == 0 || len ( volOptions [ flexvolume . SystemFsTypeKey ] . ( string ) ) == 0 || len ( volOptions [ flexvolume . ZoneKey ] . ( string ) ) == 0 || len ( volOptions [ flexvolume . ProjectKey ] . ( string ) ) == 0 { return fmt . Errorf ( " " , jsonOptions ) } d . volId = volOptions [ flexvolume . VolIdKey ] . ( string ) d . fsType = volOptions [ flexvolume . SystemFsTypeKey ] . ( string ) d . zone = volOptions [ flexvolume . ZoneKey ] . ( string ) d . project = volOptions [ flexvolume . ProjectKey ] . ( string ) return nil }
initFlexVolumeDriverForMount parse user provided jsonOptions to initialize FlexVolumeDriver.
initFlexVolumeDriverForMount parse user provided jsonOptions to initialize FlexVolumeDriver .