// ListSumologics returns the list of sumologics for the configuration version.
430224
func (c *Client) ListSumologics(i *ListSumologicsInput) ([]*Sumologic, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	path := fmt.Sprintf("/service/%s/version/%d/logging/sumologic", i.Service, i.Version)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	var ss []*Sumologic
	if err := decodeJSON(&ss, resp.Body); err != nil {
		return nil, err
	}
	sort.Stable(sumologicsByName(ss))
	return ss, nil
}
880659
func (s *RegionService) ListRegions(p *ListRegionsParams) (*ListRegionsResponse, error) {
	resp, err := s.cs.newRequest("listRegions", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
219980
func (c *ClientsetSecretStore) ListSecrets() ([]string, error) {
	list, err := c.clientset.Keysets(c.namespace).List(v1.ListOptions{})
	if err != nil {
		return nil, fmt.Errorf("error listing keysets: %v", err)
	}

	var names []string
	for i := range list.Items {
		keyset := &list.Items[i]

		switch keyset.Spec.Type {
		case kops.SecretTypeSecret:
			name := strings.TrimPrefix(keyset.Name, NamePrefix)
			names = append(names, name)
		}
	}

	return names, nil
}
698290
func (c *Client) ListVolumes(opts ListVolumesOptions) ([]Volume, error) {
	resp, err := c.do("GET", "/volumes?"+queryString(opts), doOptions{
		context: opts.Context,
	})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	m := make(map[string]interface{})
	if err = json.NewDecoder(resp.Body).Decode(&m); err != nil {
		return nil, err
	}
	var volumes []Volume
	volumesJSON, ok := m["Volumes"]
	if !ok {
		return volumes, nil
	}
	data, err := json.Marshal(volumesJSON)
	if err != nil {
		return nil, err
	}
	if err := json.Unmarshal(data, &volumes); err != nil {
		return nil, err
	}
	return volumes, nil
}
121792
func (s *backupsDocStorage) ListDocs() ([]filestorage.Document, error) {
	dbWrap := s.dbWrap.Copy()
	defer dbWrap.Close()

	var docs []storageMetaDoc
	if err := dbWrap.allMetadata(&docs); err != nil {
		return nil, errors.Trace(err)
	}

	list := make([]filestorage.Document, len(docs))
	for i, doc := range docs {
		meta := docAsMetadata(&doc)
		list[i] = meta
	}
	return list, nil
}
208143
func (s *SystemVMService) ListSystemVms(p *ListSystemVmsParams) (*ListSystemVmsResponse, error) {
	resp, err := s.cs.newRequest("listSystemVms", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
595421
func (gce *Cloud) ListSslCertificates() (*compute.SslCertificateList, error) {
	// TODO: use PageToken to list all not just the first 500
	return gce.service.SslCertificates.List(gce.projectID).Do()
}
460453
func (s *UsageService) ListUsageTypes(p *ListUsageTypesParams) (*ListUsageTypesResponse, error) {
	resp, err := s.cs.newRequest("listUsageTypes", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
1365934
func (s *TemplatesService) ListTemplateRecords(accountID string, templateIdentifier string, options *ListOptions) (*templateRecordsResponse, error) {
	path := versioned(templateRecordPath(accountID, templateIdentifier, 0))
	templateRecordsResponse := &templateRecordsResponse{}

	path, err := addURLQueryOptions(path, options)
	if err != nil {
		return nil, err
	}

	resp, err := s.client.get(path, templateRecordsResponse)
	if err != nil {
		return templateRecordsResponse, err
	}

	templateRecordsResponse.HttpResponse = resp
	return templateRecordsResponse, nil
}
936117
func (mem *memNamedMapping) ListNames(field string, value string) []string {
	mem.access.RLock()
	defer mem.access.RUnlock()

	ix, found := mem.indexes[field]
	if !found {
		return nil
	}
	set, found := ix[value]

	if !found {
		return nil
	}

	return set.content()
}
1345041
func ListProducts(w io.Writer, products map[string]registry.Record) {
	table := tablewriter.NewWriter(w)
	table.SetHeader([]string{"Name", "Command", "Properties"})

	var keys []string
	for k := range products {
		keys = append(keys, k)
	}
	sort.Strings(keys)

	for _, key := range keys {
		row := []string{
			products[key].Name,
			path.Base(products[key].Path),
			formatProps(products[key].Properties),
		}
		table.Append(row)
	}
	table.Render()
}
326603
func (pdb *BrokerWatcher) ListKeys(prefix string) (keyval.BytesKeyIterator, error) {
	keys, qm, err := pdb.client.KV().Keys(pdb.prefixKey(prefix), "", nil)
	if err != nil {
		return nil, err
	}

	return &bytesKeyIterator{len: len(keys), keys: keys, prefix: pdb.prefix, lastIndex: qm.LastIndex}, nil
}
1026217
func (self *Version) List(zoneId int64) ([]*VersionInfo, error) {
	var res []interface{}
	params := []interface{}{self.Key, zoneId}
	if err := self.Call("domain.zone.version.list", params, &res); err != nil {
		return nil, err
	}

	versions := make([]*VersionInfo, 0)
	for _, r := range res {
		version := ToVersionInfo(r.(map[string]interface{}))
		versions = append(versions, version)
	}
	return versions, nil
}
1151793
func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	path := fmt.Sprintf("/service/%s/version", i.Service)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	var e []*Version
	if err := decodeJSON(&e, resp.Body); err != nil {
		return nil, err
	}
	sort.Sort(versionsByNumber(e))

	return e, nil
}
195067
func (templateApi *TemplateApi) ListWithOptions(options map[string]string) ([]Template, error) {
	data, err := templateApi.entityService.List(options)
	if err != nil {
		return nil, err
	}
	return parseTemplateList(data), nil
}
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
}
1288915
func (s *StateSettings) ListSettings(keyPrefix string) (map[string]map[string]interface{}, error) {
	return listSettings(s.backend, s.collection, keyPrefix)
}