// PSPATMaps retrieves the list of child PSPATMaps of the PSNATPool
160052
func (o *PSNATPool) PSPATMaps(info *bambou.FetchingInfo) (PSPATMapsList, *bambou.Error) {

	var list PSPATMapsList
	err := bambou.CurrentSession().FetchChildren(o, PSPATMapIdentity, &list, info)
	return list, err
}
1151278
func (o *Domain) CreateSPATSourcesPool(child *SPATSourcesPool) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
1271209
func (s *UserResourceMappingService) FindUserResourceMappings(ctx context.Context, filter platform.UserResourceMappingFilter, opt ...platform.FindOptions) ([]*platform.UserResourceMapping, int, error) {
	return s.FindMappingsFn(ctx, filter)
}
1371935
func (s *AddressService) NewListPublicIpAddressesParams() *ListPublicIpAddressesParams {
	p := &ListPublicIpAddressesParams{}
	p.p = make(map[string]interface{})
	return p
}
111155
func (o *Link) CSNATPools(info *bambou.FetchingInfo) (CSNATPoolsList, *bambou.Error) {

	var list CSNATPoolsList
	err := bambou.CurrentSession().FetchChildren(o, CSNATPoolIdentity, &list, info)
	return list, err
}
716054
func getSortedPutPairs(updateMap BatchPutMap) batchPutPairList {
	res := batchPutPairList{}
	for item, updates := range updateMap {
		res = append(res, batchPutPair{item, updates})
	}

	sort.Sort(res)
	return res
}
162244
func (c *Client) ResourcePools(ctx context.Context, path string) ([]*object.ResourcePool, error) {
	finder, _, err := c.finder(ctx)
	if err != nil {
		return nil, errors.Trace(err)
	}
	c.logger.Tracef("listing resource pools under %q", path)
	items, err := finder.ResourcePoolList(ctx, path)
	if err != nil {
		if _, ok := err.(*find.NotFoundError); ok {
			c.logger.Debugf("no resource pools for path %q", path)
			return nil, nil
		}
		return nil, errors.Annotate(err, "listing resource pools")
	}
	return items, nil
}
642218
func ProjectPs(p project.APIProject, c *cli.Context) error {
	qFlag := c.Bool("q")
	allInfo, err := p.Ps(context.Background(), c.Args()...)
	if err != nil {
		return cli.NewExitError(err.Error(), 1)
	}
	columns := []string{"Name", "Command", "State", "Ports"}
	if qFlag {
		columns = []string{"Id"}
	}
	os.Stdout.WriteString(allInfo.String(columns, !qFlag))
	return nil
}
335136
func bpftoolMapAttach(progID string, mapID string) error {
	prog := "bpftool"

	args := []string{"prog", "attach", "id", progID, "msg_verdict", "id", mapID}
	log.WithFields(logrus.Fields{
		"bpftool": prog,
		"args":    args,
	}).Debug("Map Attach BPF Object:")
	out, err := exec.Command(prog, args...).CombinedOutput()
	if err != nil {
		return fmt.Errorf("Failed to attach prog(%s) to map(%s): %s: %s", progID, mapID, err, out)
	}
	return nil
}
668875
func (c *MemoryStore) GetMaps(keys []string) (map[string]map[string]interface{}, error) {
	values := make(map[string]map[string]interface{}, len(keys))
	for _, v := range keys {
		value, _ := c.GetMap(v)
		if value != nil {
			values[v] = value
		}
	}

	return values, nil
}
548597
func (a *api) GetResourcePools() ([]pool.ResourcePool, error) {
	client, err := a.connectMaster()
	if err != nil {
		return nil, err
	}

	return client.GetResourcePools()
}
648994
func (b *BigIP) Pools() (*Pools, error) {
	var pools Pools
	err, _ := b.getForEntity(&pools, uriLtm, uriPool)
	if err != nil {
		return nil, err
	}

	return &pools, nil
}
77475
func (cps ComparablePrincipalSets) OfMapping(mapping map[int][]int, sets2 ComparablePrincipalSets) comparablePrincipalSetPairs {
	var res []comparablePrincipalSetPair
	for i, js := range mapping {
		for _, j := range js {
			res = append(res, comparablePrincipalSetPair{
				contained:  cps[i],
				containing: sets2[j],
			})
		}
	}
	return res
}
74061
func (c *Config) IncludePatterns() []string {
	pmap := map[string]bool{}
	for _, b := range c.Blocks {
		for _, p := range b.Include {
			pmap[p] = true
		}
	}
	paths := make([]string, len(pmap))
	i := 0
	for k := range pmap {
		paths[i] = k
		i++
	}
	sort.Strings(paths)
	return paths
}
58902
func (s *SetIdentityPoolRolesInput) SetRoleMappings(v map[string]*RoleMapping) *SetIdentityPoolRolesInput {
	s.RoleMappings = v
	return s
}
1246357
func (p *Profile) massageMappings() {
	// Merge adjacent regions with matching names, checking that the offsets match
	if len(p.Mapping) > 1 {
		mappings := []*Mapping{p.Mapping[0]}
		for _, m := range p.Mapping[1:] {
			lm := mappings[len(mappings)-1]
			if adjacent(lm, m) {
				lm.Limit = m.Limit
				if m.File != "" {
					lm.File = m.File
				}
				if m.BuildID != "" {
					lm.BuildID = m.BuildID
				}
				p.updateLocationMapping(m, lm)
				continue
			}
			mappings = append(mappings, m)
		}
		p.Mapping = mappings
	}

	// Use heuristics to identify main binary and move it to the top of the list of mappings
	for i, m := range p.Mapping {
		file := strings.TrimSpace(strings.Replace(m.File, "(deleted)", "", -1))
		if len(file) == 0 {
			continue
		}
		if len(libRx.FindStringSubmatch(file)) > 0 {
			continue
		}
		if file[0] == '[' {
			continue
		}
		// Swap what we guess is main to position 0.
		p.Mapping[0], p.Mapping[i] = p.Mapping[i], p.Mapping[0]
		break
	}

	// Keep the mapping IDs neatly sorted
	for i, m := range p.Mapping {
		m.ID = uint64(i + 1)
	}
}
461081
func PSPAllowsFSType(psp *policy.PodSecurityPolicy, fsType policy.FSType) bool {
	if psp == nil {
		return false
	}

	for _, v := range psp.Spec.Volumes {
		if v == fsType || v == policy.All {
			return true
		}
	}
	return false
}