// List returns the managed Zones, or an error if the list operation failed.
976084
func (z *zones) List() ([]dnsprovider.Zone, error) {
	snapshot := z.dnsView.Snapshot()

	var zones []dnsprovider.Zone
	zoneInfos := snapshot.ListZones()
	for i := range zoneInfos {
		zones = append(zones, &zone{dnsView: z.dnsView, zoneInfo: zoneInfos[i]})
	}
	return zones, nil
}
537094
func (s *networkPolicyLister) List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1beta1.NetworkPolicy))
	})
	return ret, err
}
925143
func (r *GormRepository) List(ctx context.Context) ([]SpaceTemplate, error) {
	var objs []SpaceTemplate
	err := r.db.Find(&objs).Error
	if err != nil && err != gorm.ErrRecordNotFound {
		return nil, errs.Wrap(err, "failed to list space templates")
	}
	return objs, nil
}
196835
func (s *Server) List(ctx context.Context, q *ClusterQuery) (*appv1.ClusterList, error) {
	clusterList, err := s.db.ListClusters(ctx)
	if err != nil {
		return nil, err
	}
	clustersByServer := make(map[string][]appv1.Cluster)
	for _, clust := range clusterList.Items {
		if s.enf.Enforce(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionGet, clust.Server) {
			clustersByServer[clust.Server] = append(clustersByServer[clust.Server], clust)
		}
	}
	servers := make([]string, 0)
	for server := range clustersByServer {
		servers = append(servers, server)
	}

	items := make([]appv1.Cluster, len(servers))
	err = util.RunAllAsync(len(servers), func(i int) error {
		clusters := clustersByServer[servers[i]]
		clust := clusters[0]
		warningMessage := ""
		if len(clusters) > 1 {
			warningMessage = fmt.Sprintf("There are %d credentials configured this cluster.", len(clusters))
		}
		if clust.ConnectionState.Status == "" {
			clust.ConnectionState = s.getConnectionState(ctx, clust, warningMessage)
		}
		items[i] = *redact(&clust)
		return nil
	})
	if err != nil {
		return nil, err
	}

	clusterList.Items = items
	return clusterList, err
}
1258858
func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &v1beta1.IngressList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1beta1.IngressList{ListMeta: obj.(*v1beta1.IngressList).ListMeta}
	for _, item := range obj.(*v1beta1.IngressList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
139469
func (s *Session) List(args *structs.DCSpecificRequest,
	reply *structs.IndexedSessions) error {
	if done, err := s.srv.forward("Session.List", args, args, reply); done {
		return err
	}

	return s.srv.blockingQuery(
		&args.QueryOptions,
		&reply.QueryMeta,
		func(ws memdb.WatchSet, state *state.Store) error {
			index, sessions, err := state.SessionList(ws)
			if err != nil {
				return err
			}

			reply.Index, reply.Sessions = index, sessions
			if err := s.srv.filterACL(args.Token, reply); err != nil {
				return err
			}
			return nil
		})
}
623814
func (srv *Config) List(c context.Context, req *config.ListRequest) (*config.ListResponse, error) {
	rsp := &config.ListResponse{}
	// TODO(smut): Handle page tokens.
	if req.GetPageToken() != "" {
		return rsp, nil
	}
	srv.cfg.Range(func(_, val interface{}) bool {
		rsp.Configs = append(rsp.Configs, val.(*config.Config))
		return true
	})
	return rsp, nil
}
1115061
func (records *Records) List(ctx context.Context, zoneID string) ([]*Record, error) {
	return records.listPages(ctx, zoneID, 1)
}
862744
func (pts *PipelineTemplatesService) List(ctx context.Context) (pt []*PipelineTemplate, resp *APIResponse, err error) {
	apiVersion, err := pts.client.getAPIVersion(ctx, "admin/templates")
	if err != nil {
		return nil, nil, err
	}

	ptr := PipelineTemplatesResponse{}
	_, resp, err = pts.client.getAction(ctx, &APIClientRequest{
		Path:         "admin/templates",
		APIVersion:   apiVersion,
		ResponseBody: &ptr,
	})
	pt = ptr.Embedded.Templates

	return
}
1112739
func (gce *Cloud) ListClusters() ([]string, error) {
	allClusters := []string{}

	for _, zone := range gce.managedZones {
		clusters, err := gce.listClustersInZone(zone)
		if err != nil {
			return nil, err
		}
		// TODO: Scoping?  Do we need to qualify the cluster name?
		allClusters = append(allClusters, clusters...)
	}

	return allClusters, nil
}
732818
func (c *securityContextConstraints) List(opts v1.ListOptions) (result *security.SecurityContextConstraintsList, err error) {
	var timeout time.Duration
	if opts.TimeoutSeconds != nil {
		timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
	}
	result = &security.SecurityContextConstraintsList{}
	err = c.client.Get().
		Resource("securitycontextconstraints").
		VersionedParams(&opts, scheme.ParameterCodec).
		Timeout(timeout).
		Do().
		Into(result)
	return
}
40531
func (f FakeClusterLister) List() (*containerservice.ListResult, error) {
	return f.Resp, f.Err
}
415854
func (p *FsBlockstoreProvider) List() ([]string, error) {
	return util.ListSubdirs(p.conf.getChainsDir())
}
517539
func (s *PluginsService) List(ctx context.Context, opt *PluginsListOpts) (*plugin.PluginList, error) {
	pluginList := &plugin.PluginList{}
	return pluginList, s.client.List(ctx, pluginsUrl, opt, pluginList)
}
15205
func (self *Operation) List() ([]*OperationInfo, error) {
	var res []interface{}
	// params := Params{Params: []interface{}{self.Key}}
	params := []interface{}{self.Key}
	if err := self.Call("operation.list", params, &res); err != nil {
		return nil, err
	}

	operations := make([]*OperationInfo, len(res), len(res))
	for i, r := range res {
		operations[i] = ToOperationInfo(r.(map[string]interface{}))
	}
	return operations, nil
}
394060
func (a *Allocations) List(q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) {
	var resp []*AllocationListStub
	qm, err := a.client.query("/v1/allocations", &resp, q)
	if err != nil {
		return nil, nil, err
	}
	sort.Sort(AllocIndexSort(resp))
	return resp, qm, nil
}
943596
func (zone Zone) ListRequest() (ListCommand, error) {
	req := &ListZones{
		ID:   zone.ID,
		Name: zone.Name,
	}

	return req, nil
}