// DeleteRouteDomain removes a route domain.
339834
func (b *BigIP) DeleteRouteDomain(name string) error {
	return b.delete(uriNet, uriRouteDomain, name)
}
132291
func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) {
	// apply the uninstall options
	reqOpts := h.opts
	for _, opt := range opts {
		opt(&reqOpts)
	}

	if reqOpts.dryRun {
		// In the dry run case, just see if the release exists
		r, err := h.ReleaseContent(rlsName)
		if err != nil {
			return &rls.UninstallReleaseResponse{}, err
		}
		return &rls.UninstallReleaseResponse{Release: r.Release}, nil
	}

	req := &reqOpts.uninstallReq
	req.Name = rlsName
	req.DisableHooks = reqOpts.disableHooks
	ctx := NewContext()

	if reqOpts.before != nil {
		if err := reqOpts.before(ctx, req); err != nil {
			return nil, err
		}
	}
	return h.delete(ctx, req)
}
502792
func deleteRecord(c *godo.Client, zoneName string, recordID int) error {
	_, err := c.Domains.DeleteRecord(context.TODO(), zoneName, recordID)
	if err != nil {
		return fmt.Errorf("error deleting record: %v", err)
	}

	return nil
}
1000745
func (c *Client) DeleteRoute(appID string, routeID string) error {
	return c.Delete(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), nil)
}
736155
func (*DNSProviderManual) CleanUp(domain, token, keyAuth string) error {
	fqdn, _ := GetRecord(domain, keyAuth)

	authZone, err := FindZoneByFqdn(fqdn)
	if err != nil {
		return err
	}

	fmt.Printf("lego: You can now remove this TXT record from your %s zone:\n", authZone)
	fmt.Printf(dnsTemplate+"\n", fqdn, DefaultTTL, "...")

	return nil
}
636513
func (c *Client) DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error) {
	var resource *ct.Resource
	return resource, c.Delete(fmt.Sprintf("/providers/%s/resources/%s/apps/%s", providerID, resourceID, appID), &resource)
}
1285153
func (t *DomainPassword) Delete() (err error) {
	err = sysCredDelete(&t.Credential, sysCRED_TYPE_DOMAIN_PASSWORD)
	return
}
923945
func (c *killCommand) DirectDestroyRemaining(ctx *cmd.Context, api destroyControllerAPI) {
	hasErrors := false
	hostedConfig, err := api.HostedModelConfigs()
	if err != nil {
		hasErrors = true
		logger.Errorf("unable to retrieve hosted model config: %v", err)
	}
	ctrlUUID := ""
	// try to get controller UUID or just ignore.
	if ctrlCfg, err := api.ControllerConfig(); err == nil {
		ctrlUUID = ctrlCfg.ControllerUUID()
	} else {
		logger.Warningf("getting controller config from API: %v", err)
	}
	for _, model := range hostedConfig {
		if model.Error != nil {
			// We can only display model name here since
			// the error coming from api can be anything
			// including the parsing of the model owner tag.
			// Only model name is guaranteed to be set in the result
			// when an error is returned.
			hasErrors = true
			logger.Errorf("could not kill %s directly: %v", model.Name, model.Error)
			continue
		}
		ctx.Infof("Killing %s/%s directly", model.Owner.Id(), model.Name)
		cfg, err := config.New(config.NoDefaults, model.Config)
		if err != nil {
			logger.Errorf(err.Error())
			hasErrors = true
			continue
		}
		p, err := environs.Provider(model.CloudSpec.Type)
		if err != nil {
			logger.Errorf(err.Error())
			hasErrors = true
			continue
		}
		// TODO(caas) - only cloud providers support Destroy()
		if cloudProvider, ok := p.(environs.CloudEnvironProvider); ok {
			env, err := environs.Open(cloudProvider, environs.OpenParams{
				ControllerUUID: ctrlUUID,
				Cloud:          model.CloudSpec,
				Config:         cfg,
			})
			if err != nil {
				logger.Errorf(err.Error())
				hasErrors = true
				continue
			}
			cloudCallCtx := cloudCallContext(c.credentialAPIFunctionForModel(model.Name))
			if err := env.Destroy(cloudCallCtx); err != nil {
				logger.Errorf(err.Error())
				hasErrors = true
				continue
			}
		}
		ctx.Infof("  done")
	}
	if hasErrors {
		logger.Errorf("there were problems destroying some models, manual intervention may be necessary to ensure resources are released")
	} else {
		ctx.Infof("All hosted models destroyed, cleaning up controller machines")
	}
}
319899
func (e *Enforcer) DeleteRoleForUser(user string, role string) bool {
	return e.RemoveGroupingPolicy(user, role)
}
346762
func (ec2i *FakeEC2Impl) DeleteRoute(request *ec2.DeleteRouteInput) (*ec2.DeleteRouteOutput, error) {
	panic("Not implemented")
}
828717
func (t *Templater) Del(path string) {
	t.m.Lock()
	defer t.m.Unlock()
	delete(t.templates, path)
}
796993
func (rc *ResourceController) DeleteResource(ctx *gin.Context) {
	var id bson.ObjectId
	req := ctx.Request
	resourceType := getResourceType(req.URL)

	// Validate id as a bson Object ID
	id, err := toBsonObjectID(ctx.Param("id"))
	if err != nil {
		ctx.AbortWithError(http.StatusInternalServerError, err)
		return
	}
	logger.Log.WithFields(
		logrus.Fields{"resource type": resourceType, "id": id, "coll": ptm_models.GetCollectionName(resourceType)}).Info("DeleteResource")

	// Determine the collection expected to hold the resource
	c := rc.Database().C(ptm_models.GetCollectionName(resourceType))
	err = c.Remove(bson.M{"_id": id})
	if err != nil {
		ctx.AbortWithError(http.StatusInternalServerError, err)
		return
	}

	ctx.Status(http.StatusNoContent)
}
422249
func GenerateDeleteOuterQuery(del *sqlparser.Delete, aliased *sqlparser.AliasedTableExpr) *sqlparser.ParsedQuery {
	buf := sqlparser.NewTrackedBuffer(nil)
	buf.Myprintf("delete %vfrom %v where %a%v", del.Comments, aliased.RemoveHints(), ":#pk", del.OrderBy)
	return buf.ParsedQuery()
}
878916
func (c *ConsulAlertClient) DeleteReminder(node string, checkid string) {
	key := fmt.Sprintf("consul-alerts/reminders/%s/%s", node, checkid)
	c.api.KV().Delete(key, nil)
	log.Println("Deleting reminder for node: ", node)
}
135907
func (c *Cloud) DeleteRoute(clusterName string, route *cloudprovider.Route) error {
	table, err := c.findRouteTable(clusterName)
	if err != nil {
		return err
	}

	request := &ec2.DeleteRouteInput{}
	request.DestinationCidrBlock = aws.String(route.DestinationCIDR)
	request.RouteTableId = table.RouteTableId

	_, err = c.ec2.DeleteRoute(request)
	if err != nil {
		return fmt.Errorf("error deleting AWS route (%s): %v", route.DestinationCIDR, err)
	}

	return nil
}
1272093
func (pwm *Manager) DeleteResetToken(token string) (err error) {
	_, err = pwm.tokencollection.RemoveAll(bson.M{"token": token})
	return
}
822423
func (s *RoleService) DeleteRolePermission(p *DeleteRolePermissionParams) (*DeleteRolePermissionResponse, error) {
	resp, err := s.cs.newRequest("deleteRolePermission", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}