func (f *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, route *cloudprovider.Route) error {
	f.Lock.Lock()
	defer f.Lock.Unlock()
	f.addCall("create-route")
	name := clusterName + "-" + string(route.TargetNode) + "-" + route.DestinationCIDR
	if _, exists := f.RouteMap[name]; exists {
		f.Err = fmt.Errorf("route %q already exists", name)
		return f.Err
	}
	fakeRoute := Route{}
	fakeRoute.Route = *route
	fakeRoute.Route.Name = name
	fakeRoute.ClusterName = clusterName
	f.RouteMap[name] = &fakeRoute
	return nil
}
// CreateRoute creates the described managed route
// route.Name will be ignored, although the cloud-provider may use nameHint
// to create a more user-meaningful name.
CreateRoute creates the described managed route
route.Name will be ignored, although the cloud-provider may use nameHint
to create a more user-meaningful name.
// CreateRoute creates the described managed route // route . Name will be ignored although the cloud - provider may use nameHint // to create a more user - meaningful name .
func (f *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, route *cloudprovider.Route) error {
	f.Lock.Lock()
	defer f.Lock.Unlock()
	f.addCall("create-route")
	name := clusterName + "-" + string(route.TargetNode) + "-" + route.DestinationCIDR
	if _, exists := f.RouteMap[name]; exists {
		f.Err = fmt.Errorf("route %q already exists", name)
		return f.Err
	}
	fakeRoute := Route{}
	fakeRoute.Route = *route
	fakeRoute.Route.Name = name
	fakeRoute.ClusterName = clusterName
	f.RouteMap[name] = &fakeRoute
	return nil
}
func ( f * Cloud ) CreateRoute ( ctx context . Context , clusterName string , nameHint string , route * cloudprovider . Route ) error { f . Lock . Lock ( ) defer f . Lock . Unlock ( ) f . addCall ( " " ) name := clusterName + " " + string ( route . TargetNode ) + " " + route . DestinationCIDR if _ , exists := f . RouteMap [ name ] ; exists { f . Err = fmt . Errorf ( " " , name ) return f . Err } fakeRoute := Route { } fakeRoute . Route = * route fakeRoute . Route . Name = name fakeRoute . ClusterName = clusterName f . RouteMap [ name ] = & fakeRoute return nil }
CreateRoute creates the described managed route
route.Name will be ignored, although the cloud-provider may use nameHint
to create a more user-meaningful name.
CreateRoute creates the described managed route route . Name will be ignored although the cloud - provider may use nameHint to create a more user - meaningful name .