//DeleteBgp deletes from etcd state
196568
func DeleteBgp(stateDriver core.StateDriver, hostname string) error {
	log.Infof("Deleting bgp neighbor for {%v}", hostname)
	bgpState := &mastercfg.CfgBgpState{}
	bgpState.StateDriver = stateDriver
	err := bgpState.Read(hostname)
	if err != nil {
		log.Errorf("Error reading bgp config for hostname %s", hostname)
		return err
	}
	err = bgpState.Clear()
	if err != nil {
		log.Errorf("Error deleing Bgp config for hostname %s", hostname)
		return err
	}
	return nil

}
271997
func httpDeleteBgp(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpDeleteBgp: %+v", vars)

	key := vars["key"]

	// Delete the object
	err := DeleteBgp(key)
	if err != nil {
		log.Errorf("DeleteBgp error for: %s. Err: %v", key, err)
		return nil, err
	}

	// Return the obj
	return key, nil
}
62302
func (ip *Interpreter) deleteGroup(args []string) {
	ip.simpleResponder(ip.Backend.DeleteGroup(args[0]))
}
1173246
func (pg *GoEvtxMap) Del(path ...string) {
	if len(path) > 0 {
		if ge, ok := (*pg)[path[0]]; ok {
			if len(path) == 1 {
				delete((*pg), path[0])
			}
			switch ge.(type) {
			case GoEvtxMap:
				p := ge.(GoEvtxMap)
				p.Del(path[1:]...)
			}
		}
	}
}
67005
func NewBGP(socket string, asn uint32) *BGP {
	if socket == "" {
		socket = BGPSocketPath
	}
	return &BGP{
		vty: NewVTY(socket),
		asn: asn,
	}
}
877134
func (h *receivedPacketHistory) DeleteBelow(p protocol.PacketNumber) {
	if p <= h.lowestInReceivedPacketNumbers {
		return
	}
	h.lowestInReceivedPacketNumbers = p

	nextEl := h.ranges.Front()
	for el := h.ranges.Front(); nextEl != nil; el = nextEl {
		nextEl = el.Next()

		if p > el.Value.Start && p <= el.Value.End {
			el.Value.Start = p
		} else if el.Value.End < p { // delete a whole range
			h.ranges.Remove(el)
		} else { // no ranges affected. Nothing to do
			return
		}
	}
}
235318
func quaggaBGP(asn uint32) (*quagga.BGP, error) {
	bgp := quagga.NewBGP("", asn)
	if err := bgp.Dial(); err != nil {
		return nil, err
	}
	if err := bgp.Enable(); err != nil {
		bgp.Close()
		return nil, err
	}
	return bgp, nil
}
977080
func (f *Fibre) Delete(p string, h HandlerFunc) {
	f.router.Add(DELETE, p, h)
}
73400
func (ms *manifestStore) Delete(ctx context.Context, dgst digest.Digest) error {
	dcontext.GetLogger(ms.ctx).Debug("(*manifestStore).Delete")
	return ms.blobStore.Delete(ctx, dgst)
}
624754
func (n *NetworkServerAPI) DeleteGatewayProfile(ctx context.Context, req *ns.DeleteGatewayProfileRequest) (*empty.Empty, error) {
	var gpID uuid.UUID
	copy(gpID[:], req.Id)

	if err := storage.DeleteGatewayProfile(storage.DB(), gpID); err != nil {
		return nil, errToRPCError(err)
	}

	return &empty.Empty{}, nil
}
1094049
func (api *GSLBAPI) DeleteGSLBServer(gslbName string, ip string) error {
	gslbItem, err := api.findOrCreateBy(gslbName)
	if err != nil {
		return err
	}
	gslbItem.Settings.GSLB.DeleteServer(ip)

	if gslbItem.HasGSLBServer() {
		_, err = api.updateGSLBServers(gslbItem)
		if err != nil {
			return err
		}

	} else {
		_, err = api.Delete(gslbItem.ID)
		if err != nil {
			return err
		}

	}
	return nil
}
143396
func (s *BigSwitchBCFService) NewDeleteBigSwitchBcfDeviceParams(bcfdeviceid string) *DeleteBigSwitchBcfDeviceParams {
	p := &DeleteBigSwitchBcfDeviceParams{}
	p.p = make(map[string]interface{})
	p.p["bcfdeviceid"] = bcfdeviceid
	return p
}
461591
func (d *VppDriver) DeleteEndpoint(id string) (err error) {
	log.Infof("Not implemented")
	return nil
}
659992
func (gw *realEPManager) removeMapPath(path string) {
	if err := os.RemoveAll(path); err != nil {
		log.WithError(err).WithField(logfields.Path, path).Warn("Error while deleting stale map file")
	} else {
		log.WithField(logfields.Path, path).Info("Removed stale bpf map")
	}
}
306907
func (p *ProxyLB) DeleteBindPort(mode string, port int) {
	p.Settings.ProxyLB.DeleteBindPort(mode, port)
}
103767
func (s *VPNService) DeleteVpnGateway(p *DeleteVpnGatewayParams) (*DeleteVpnGatewayResponse, error) {
	resp, err := s.cs.newRequest("deleteVpnGateway", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DeleteVpnGatewayResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
247409
func (d *OvsDriver) InspectBgp() ([]byte, error) {

	// get vlan switch state
	bgpState, err := d.switchDb["vlan"].InspectBgp()
	if err != nil {
		return []byte{}, err
	}

	// json marshall the map
	jsonState, err := json.Marshal(bgpState)
	if err != nil {
		log.Errorf("Error encoding epstats. Err: %v", err)
		return []byte{}, err
	}

	return jsonState, nil
}