func (f *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error {
	f.Lock.Lock()
	defer f.Lock.Unlock()
	f.addCall("delete-route")
	name := ""
	for key, saved := range f.RouteMap {
		if route.DestinationCIDR == saved.Route.DestinationCIDR &&
			route.TargetNode == saved.Route.TargetNode &&
			clusterName == saved.ClusterName {
			name = key
			break
		}
	}

	if len(name) == 0 {
		f.Err = fmt.Errorf("no route found for node:%v with DestinationCIDR== %v", route.TargetNode, route.DestinationCIDR)
		return f.Err
	}

	delete(f.RouteMap, name)
	return nil
}
// DeleteRoute deletes the specified managed route
// Route should be as returned by ListRoutes
DeleteRoute deletes the specified managed route
Route should be as returned by ListRoutes
// DeleteRoute deletes the specified managed route // Route should be as returned by ListRoutes
func (f *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error {
	f.Lock.Lock()
	defer f.Lock.Unlock()
	f.addCall("delete-route")
	name := ""
	for key, saved := range f.RouteMap {
		if route.DestinationCIDR == saved.Route.DestinationCIDR &&
			route.TargetNode == saved.Route.TargetNode &&
			clusterName == saved.ClusterName {
			name = key
			break
		}
	}
	if len(name) == 0 {
		f.Err = fmt.Errorf("no route found for node:%v with DestinationCIDR== %v", route.TargetNode, route.DestinationCIDR)
		return f.Err
	}
	delete(f.RouteMap, name)
	return nil
}
func ( f * Cloud ) DeleteRoute ( ctx context . Context , clusterName string , route * cloudprovider . Route ) error { f . Lock . Lock ( ) defer f . Lock . Unlock ( ) f . addCall ( " " ) name := " " for key , saved := range f . RouteMap { if route . DestinationCIDR == saved . Route . DestinationCIDR && route . TargetNode == saved . Route . TargetNode && clusterName == saved . ClusterName { name = key break } } if len ( name ) == 0 { f . Err = fmt . Errorf ( " " , route . TargetNode , route . DestinationCIDR ) return f . Err } delete ( f . RouteMap , name ) return nil }
DeleteRoute deletes the specified managed route
Route should be as returned by ListRoutes
DeleteRoute deletes the specified managed route Route should be as returned by ListRoutes