//BgpDelete deletes bgp neighbor
321214
func (ac *APIController) BgpDelete(bgpCfg *contivModel.Bgp) error {

	log.Infof("Received delete for Bgp config on {%+v} ", bgpCfg.Hostname)
	// Get the state driver
	stateDriver, err := utils.GetStateDriver()
	if err != nil {
		return err
	}

	err = master.DeleteBgp(stateDriver, bgpCfg.Hostname)
	if err != nil {
		log.Errorf("Error Deleting Bgp neighbor. Err: %v", err)
		return err
	}
	return nil
}
873336
func (t *Tree) deleteNode(rr dns.RR) {
	if t.Root == nil {
		return
	}
	var d int
	t.Root, d = t.Root.delete(rr)
	t.Count += d
	if t.Root == nil {
		return
	}
	t.Root.Color = black
}
425276
func (s *SeesawEngine) BGPNeighbors(ctx *ipc.Context, reply *quagga.Neighbors) error {
	s.trace("BGPNeighbors", ctx)
	if ctx == nil {
		return errors.New("context is nil")
	}

	if !ctx.IsTrusted() {
		return errors.New("insufficient access")
	}

	if reply == nil {
		return fmt.Errorf("Neighbors is nil")
	}
	s.engine.bgpManager.lock.RLock()
	reply.Neighbors = s.engine.bgpManager.neighbors
	s.engine.bgpManager.lock.RUnlock()
	return nil
}
420992
func (s *Service) Delete(ctx context.Context, cluster, db, rp string) error {
	s.dbrpMappingKV.Delete(encodeDBRPMappingKey(cluster, db, rp))
	return nil
}
1234047
func (pdb *BytesBrokerWatcherRedis) Delete(match string, opts ...datasync.DelOption) (found bool, err error) {
	if pdb.delegate.closed {
		return false, fmt.Errorf("Delete(%s) called on a closed connection", match)
	}
	pdb.Debugf("Delete(%s)", match)

	return pdb.delegate.Delete(pdb.addPrefix(match), opts...)
}
651290
func (s *Service) DomainDelete(ctx context.Context, appIdentity string, domainIdentity string) (*Domain, error) {
	var domain Domain
	return &domain, s.Delete(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity))
}
98952
func Delete(r *mux.Router, pat string, h http.Handler, middleware ...func(http.Handler) http.Handler) *mux.Route {
	return registerPat(r, "DELETE", pat, h, middleware)
}
144320
func (b *BigIP) BGPNeighbors(instance string) (*BGPNeighbors, error) {
	var bgpNeighbors BGPNeighbors
	err, _ := b.getForEntity(&bgpNeighbors, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
	if err != nil {
		return nil, err
	}

	return &bgpNeighbors, nil
}
943534
func DeleteBgp(key string) error {
	collections.BgpMutex.Lock()
	obj := collections.Bgps[key]
	collections.BgpMutex.Unlock()
	if obj == nil {
		log.Errorf("Bgp %s not found", key)
		return errors.New("Bgp not found")
	}

	// Check if we handle this object
	if objCallbackHandler.BgpCb == nil {
		log.Errorf("No callback registered for Bgp object")
		return errors.New("Invalid object type")
	}

	// Perform callback
	err := objCallbackHandler.BgpCb.BgpDelete(obj)
	if err != nil {
		log.Errorf("BgpDelete retruned error for: %+v. Err: %v", obj, err)
		return err
	}

	// delete it from modeldb
	collections.BgpMutex.Lock()
	err = obj.Delete()
	collections.BgpMutex.Unlock()
	if err != nil {
		log.Errorf("Error deleting Bgp %s. Err: %v", obj.Key, err)
	}

	// delete it from cache
	collections.BgpMutex.Lock()
	delete(collections.Bgps, key)
	collections.BgpMutex.Unlock()

	return nil
}
247619
func (g *Virtual) Delete(e EdgeSet) *Virtual {
	return g.Keep(func(v, w int) bool {
		return !e.Contains(v, w)
	})
}
417334
func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error {
	r, err := op.c.newRequest("DELETE", "/v1/operator/raft/peer")
	if err != nil {
		return err
	}
	r.setWriteOptions(q)

	r.params.Set("address", address)

	_, resp, err := requireOK(op.c.doRequest(r))
	if err != nil {
		return err
	}

	resp.Body.Close()
	return nil
}
95001
func (a *API) Delete(path string, f func(http.ResponseWriter, *http.Request)) {
	a.router.Del(path, http.HandlerFunc(f))
}
977080
func (f *Fibre) Delete(p string, h HandlerFunc) {
	f.router.Add(DELETE, p, h)
}
294434
func (c *Client) Delete(path string) error {
	pconn, err := c.getIdleConn()
	if err != nil {
		return err
	}

	defer c.returnConn(pconn)

	return pconn.sendCommandExpected(replyFileActionOkay, "DELE %s", path)
}
991530
func (c *FakeIngressRoutes) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(ingressroutesResource, c.ns, name), &v1alpha1.IngressRoute{})

	return err
}
1030249
func (c *Client) EndpointDelete(id string) error {
	params := endpoint.NewDeleteEndpointIDParams().WithID(id).WithTimeout(api.ClientTimeout)
	_, _, err := c.Endpoint.DeleteEndpointID(params)
	return Hint(err)
}
960374
func (rg *RouteGroup) Delete(path string, handlers ...Handler) *Route {
	return rg.add("DELETE", path, handlers)
}