code: func parseNetworkGenericOptions(data interface{}) (*configuration, error) {
  	var (
  		err    error
  		config *configuration
  	)
  	switch opt := data.(type) {
  	case *configuration:
  		config = opt
  	case map[string]string:
  		config = &configuration{}
  		err = config.fromOptions(opt)
  	case options.Generic:
  		var opaqueConfig interface{}
  		if opaqueConfig, err = options.GenerateFromModel(opt, config); err == nil {
  			config = opaqueConfig.(*configuration)
  		}
  	default:
  		err = types.BadRequestErrorf("unrecognized network configuration format: %v", opt)
  	}
  	return config, err
  }
docs: // parseNetworkGenericOptions parse generic driver docker network options