// DisablePlanForAllOrgs disables access to a specific plan of the given service, from the given broker in all orgs.
420258
func (actor Actor) DisablePlanForAllOrgs(serviceName, servicePlanName, brokerName string) (Warnings, error) {
	servicePlans, allWarnings, err := actor.GetServicePlansForService(serviceName, brokerName)
	if err != nil {
		return allWarnings, err
	}

	planFound := false
	for _, plan := range servicePlans {
		if plan.Name == servicePlanName {
			warnings, err := actor.removeOrgLevelServicePlanVisibilities(plan.GUID, "")
			allWarnings = append(allWarnings, warnings...)
			if err != nil {
				return allWarnings, err
			}

			if plan.Public == true {
				ccv2Warnings, err := actor.CloudControllerClient.UpdateServicePlan(plan.GUID, false)
				allWarnings = append(allWarnings, ccv2Warnings...)
				return allWarnings, err
			}
			planFound = true
			break
		}
	}

	if planFound == false {
		return allWarnings, actionerror.ServicePlanNotFoundError{PlanName: servicePlanName, ServiceName: serviceName}
	}
	return allWarnings, nil
}
472724
func (s *GetMappingService) AllowNoIndices(allowNoIndices bool) *GetMappingService {
	s.allowNoIndices = &allowNoIndices
	return s
}
105800
func (p *Permissions) SetAll(v bool) {
	if p.Backups == nil {
		p.Backups = &BackupPerm{v, v, v}
	} else {
		p.Backups.SetAll(v)
	}
	if p.Firewalls == nil {
		p.Firewalls = &FirewallPerm{v, v, v, v, v, v, v, v}
	} else {
		p.Firewalls.SetAll(v)
	}
	if p.Images == nil {
		p.Images = &ImagePerm{v, v, v, v, v, v}
	} else {
		p.Images.SetAll(v)
	}
	if p.Invoice == nil {
		p.Invoice = &InvoicePerm{v}
	} else {
		p.Invoice.SetAll(v)
	}
	if p.IPs == nil {
		p.IPs = &IPPerm{v, v, v, v, v}
	} else {
		p.IPs.SetAll(v)
	}
	if p.LoadBalancers == nil {
		p.LoadBalancers = &LoadBalancerPerm{v, v, v, v, v, v, v, v}
	} else {
		p.LoadBalancers.SetAll(v)
	}
	if p.Logs == nil {
		p.Logs = &LogPerm{v}
	} else {
		p.Logs.SetAll(v)
	}
	if p.MonitorCenter == nil {
		p.MonitorCenter = &MonitorCenterPerm{v}
	} else {
		p.MonitorCenter.SetAll(v)
	}
	if p.MonitorPolicies == nil {
		p.MonitorPolicies = &MonitorPolicyPerm{v, v, v, v, v, v, v, v, v, v, v}
	} else {
		p.MonitorPolicies.SetAll(v)
	}
	if p.PrivateNetworks == nil {
		p.PrivateNetworks = &PrivateNetworkPerm{v, v, v, v, v, v, v}
	} else {
		p.PrivateNetworks.SetAll(v)
	}
	if p.Roles == nil {
		p.Roles = &RolePerm{v, v, v, v, v, v, v, v}
	} else {
		p.Roles.SetAll(v)
	}
	if p.Servers == nil {
		p.Servers = &ServerPerm{v, v, v, v, v, v, v, v, v, v, v, v, v, v, v}
	} else {
		p.Servers.SetAll(v)
	}
	if p.SharedStorage == nil {
		p.SharedStorage = &SharedStoragePerm{v, v, v, v, v, v, v, v}
	} else {
		p.SharedStorage.SetAll(v)
	}
	if p.Usages == nil {
		p.Usages = &UsagePerm{v}
	} else {
		p.Usages.SetAll(v)
	}
	if p.Users == nil {
		p.Users = &UserPerm{v, v, v, v, v, v, v, v, v, v}
	} else {
		p.Users.SetAll(v)
	}
	if p.VPNs == nil {
		p.VPNs = &VPNPerm{v, v, v, v, v, v}
	} else {
		p.VPNs.SetAll(v)
	}
}
1358149
func (s *Service) DeleteOrganizationBuckets(ctx context.Context, id platform.ID) error {
	bucks, err := s.findBuckets(ctx, platform.BucketFilter{
		OrganizationID: &id,
	})
	if err != nil {
		return err
	}
	for _, buck := range bucks {
		s.bucketKV.Delete(buck.ID.String())
	}
	return nil
}
892076
func (c *Client) OrganizationAppListForOrganization(organizationIdentity string, lr *ListRange) ([]OrganizationApp, error) {
	req, err := c.NewRequest("GET", "/organizations/"+organizationIdentity+"/apps", nil, nil)
	if err != nil {
		return nil, err
	}

	if lr != nil {
		lr.SetHeader(req)
	}

	var organizationAppsRes []OrganizationApp
	return organizationAppsRes, c.DoReq(req, &organizationAppsRes)
}
303307
func (s *PercolateService) AllowNoIndices(allowNoIndices bool) *PercolateService {
	s.allowNoIndices = &allowNoIndices
	return s
}
515634
func (s *IndicesCloseService) AllowNoIndices(allowNoIndices bool) *IndicesCloseService {
	s.allowNoIndices = &allowNoIndices
	return s
}
456849
func (m *mapReact) DisableAll() {
	m.ro.Lock()
	for ms := range m.ma {
		m.ma[ms] = false
	}
	m.ro.Unlock()
}
501277
func (actor Actor) EnableServiceForOrg(serviceName, orgName, brokerName string) (Warnings, error) {
	servicePlans, allWarnings, err := actor.GetServicePlansForService(serviceName, brokerName)
	if err != nil {
		return allWarnings, err
	}

	org, orgWarnings, err := actor.GetOrganizationByName(orgName)
	allWarnings = append(allWarnings, orgWarnings...)
	if err != nil {
		return allWarnings, err
	}

	for _, plan := range servicePlans {
		if plan.Public != true {
			_, warnings, err := actor.CloudControllerClient.CreateServicePlanVisibility(plan.GUID, org.GUID)
			allWarnings = append(allWarnings, warnings...)
			if _, alreadyExistsError := err.(ccerror.ServicePlanVisibilityExistsError); alreadyExistsError {
				return allWarnings, nil
			}
			if err != nil {
				return allWarnings, err
			}
		}
	}

	return allWarnings, nil
}
1113740
func (c *Compactor) DisableCompactions() {
	c.mu.Lock()
	c.compactionsEnabled = false
	if c.compactionsInterrupt != nil {
		close(c.compactionsInterrupt)
		c.compactionsInterrupt = nil
	}
	c.mu.Unlock()
}
400593
func (s *MarketplaceService) ListPlanAccountsForPlan(ctx context.Context, planID int64, opt *ListOptions) ([]*MarketplacePlanAccount, *Response, error) {
	uri := s.marketplaceURI(fmt.Sprintf("plans/%v/accounts", planID))
	u, err := addOptions(uri, opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var accounts []*MarketplacePlanAccount
	resp, err := s.client.Do(ctx, req, &accounts)
	if err != nil {
		return nil, resp, err
	}

	return accounts, resp, nil
}
1031157
func (ep *endpoint) disableService() {
	ep.Lock()
	defer ep.Unlock()
	ep.serviceEnabled = false
}
1306483
func (s *stateEP) DelOrgs(delorgs ...string) {
	for _, delorg := range delorgs {
		delete(s.orgs, delorg)
	}
}
411622
func (s *AccessService) DeleteAllRoles() error {
	return s.DeleteRange(context.TODO(), backend.Key(rolesPrefix), backend.RangeEnd(backend.Key(rolesPrefix)))
}
295856
func (s *Sublist) RemoveAllForClient(c *client) {
	s.Lock()
	removes := s.removes
	s.removeClientSubs(s.root, c)
	if s.removes != removes {
		atomic.AddUint64(&s.genid, 1)
	}
	s.Unlock()
}
1083015
func (c *legacyNovaFirewaller) DeleteAllModelGroups(ctx context.ProviderCallContext) error {
	return deleteSecurityGroupsMatchingName(ctx, c.deleteSecurityGroups, c.jujuGroupRegexp())
}
48801
func (actor Actor) EnablePlanForOrg(serviceName, servicePlanName, orgName, brokerName string) (Warnings, error) {
	servicePlans, allWarnings, err := actor.GetServicePlansForService(serviceName, brokerName)
	if err != nil {
		return allWarnings, err
	}

	org, orgWarnings, err := actor.GetOrganizationByName(orgName)
	allWarnings = append(allWarnings, orgWarnings...)
	if err != nil {
		return allWarnings, err
	}

	for _, plan := range servicePlans {
		if plan.Name == servicePlanName {
			if plan.Public {
				return allWarnings, nil
			}
			_, warnings, err := actor.CloudControllerClient.CreateServicePlanVisibility(plan.GUID, org.GUID)
			allWarnings = append(allWarnings, warnings...)
			if _, alreadyExistsError := err.(ccerror.ServicePlanVisibilityExistsError); alreadyExistsError {
				return allWarnings, nil
			}
			return allWarnings, err
		}
	}

	return nil, fmt.Errorf("Service plan '%s' not found", servicePlanName)
}