// Delete an existing Group expression.
545053
func (g *Group) Delete(e *GroupExpr) {
	fingerprint := e.FingerPrint()
	equiv, ok := g.Fingerprints[fingerprint]
	if !ok {
		return // Can not find the target GroupExpr.
	}

	g.Equivalents.Remove(equiv)
	delete(g.Fingerprints, fingerprint)

	operand := GetOperand(equiv.Value.(*GroupExpr).ExprNode)
	if g.FirstExpr[operand] != equiv {
		return // The target GroupExpr is not the first Element of the same Operand.
	}

	nextElem := equiv.Next()
	if nextElem != nil && GetOperand(nextElem.Value.(*GroupExpr).ExprNode) == operand {
		g.FirstExpr[operand] = nextElem
		return // The first Element of the same Operand has been changed.
	}
	delete(g.FirstExpr, operand)
}
547198
func (sg SecurityGroup) Delete(ctx context.Context, client *Client) error {
	if sg.ID == nil && sg.Name == "" {
		return fmt.Errorf("a SecurityGroup may only be deleted using ID or Name")
	}

	req := &DeleteSecurityGroup{}

	if sg.ID != nil {
		req.ID = sg.ID
	} else {
		req.Name = sg.Name
	}

	return client.BooleanRequestWithContext(ctx, req)
}
991987
func GroupRemoveAll(ctx context.Context, groupName string) error {
	return groupServiceInstance.GroupRemoveAll(ctx, groupName)
}
1099932
func (s *SecurityGroupService) NewDeleteSecurityGroupParams() *DeleteSecurityGroupParams {
	p := &DeleteSecurityGroupParams{}
	p.p = make(map[string]interface{})
	return p
}
883005
func (s *VMGroupService) NewDeleteInstanceGroupParams(id string) *DeleteInstanceGroupParams {
	p := &DeleteInstanceGroupParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
1083015
func (c *legacyNovaFirewaller) DeleteAllModelGroups(ctx context.ProviderCallContext) error {
	return deleteSecurityGroupsMatchingName(ctx, c.deleteSecurityGroups, c.jujuGroupRegexp())
}
1011061
func (ac *APIController) ExtContractsGroupDelete(contractsGroup *contivModel.ExtContractsGroup) error {
	log.Infof("Received ExtContractsGroupDelete: %+v", contractsGroup)

	// At this moment, we let the external contracts to be deleted only
	// if there are no consumers of this external contracts group
	if isExtContractsGroupUsed(contractsGroup) == true {
		log.Errorf("Error: External contracts groups is being used: %s", contractsGroup.ContractsGroupName)
		return core.Errorf("External contracts group is in-use")
	}

	return nil
}
978121
func GroupRemoveMember(ctx context.Context, groupName, uid string) error {
	logger.Log.Debugf("Remove user from group %s, UID=%d", groupName, uid)
	return groupServiceInstance.GroupRemoveMember(ctx, groupName, uid)
}
1224014
func (c *Client) DeleteSecGroup(guid string) error {
	//Perform the DELETE and check for errors
	resp, err := c.DoRequest(c.NewRequest("DELETE", fmt.Sprintf("/v2/security_groups/%s", guid)))
	if err != nil {
		return err
	}
	if resp.StatusCode != 204 { //204 No Content
		return fmt.Errorf("CF API returned with status code %d", resp.StatusCode)
	}
	return nil
}
941718
func (s *Sensu) DeleteAggregate(aggregate string) error {
	return s.delete(fmt.Sprintf("aggregate/%s", aggregate))
}
62302
func (ip *Interpreter) deleteGroup(args []string) {
	ip.simpleResponder(ip.Backend.DeleteGroup(args[0]))
}
844771
func quitGroup(src string, hexid string) error {
	gr, ok := groups[hexid]
	if !ok {
		return UnknownGroupIDError{hexid}
	}

	gr.Members = removeMember(src, gr.Members)

	return saveGroup(hexid)
}
1020067
func (s *Statement) Delete(m Code, key Code) *Statement {
	g := &Group{
		close:     ")",
		items:     []Code{m, key},
		multi:     false,
		name:      "delete",
		open:      "delete(",
		separator: ",",
	}
	*s = append(*s, g)
	return s
}
320478
func (client *Client) DeleteDomainGroup(args *DeleteDomainGroupArgs) (response *DeleteDomainGroupResponse, err error) {
	action := "DeleteDomainGroup"
	response = &DeleteDomainGroupResponse{}
	err = client.Invoke(action, args, response)
	if err == nil {
		return response, nil
	} else {
		log.Printf("%s error, %v", action, err)
		return response, err
	}
}
683057
func (b *Broker) DeleteGroups(request *DeleteGroupsRequest) (*DeleteGroupsResponse, error) {
	response := new(DeleteGroupsResponse)

	if err := b.sendAndReceive(request, response); err != nil {
		return nil, err
	}

	return response, nil
}
979927
func (g *Graph) Delete(n interface{}) {

	if g == nil {
		return
	}
	for i := 0; i < g.Len(); i++ {
		if g.Out[i].This == n {
			if i < (g.Len() - 1) {
				g.Out = append(g.Out[:i], g.Out[i+1:]...)
			} else {
				g.Out = g.Out[:i]
			}
			i--
		}
	}
}
414327
func (s *VMGroupService) DeleteInstanceGroup(p *DeleteInstanceGroupParams) (*DeleteInstanceGroupResponse, error) {
	resp, err := s.cs.newRequest("deleteInstanceGroup", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}