// ListKVMs handles a request to retrieve KVMs.
170951
func (*Service) ListKVMs(c context.Context, req *crimson.ListKVMsRequest) (*crimson.ListKVMsResponse, error) {
	kvms, err := listKVMs(c, req)
	if err != nil {
		return nil, err
	}
	return &crimson.ListKVMsResponse{
		Kvms: kvms,
	}, nil
}
1211710
func (e *ApiClientService) ListKeys(clientName string) (data *ApiClientKeyListResult, err error) {
	url := fmt.Sprintf("clients/%s/keys", clientName)
	err = e.client.magicRequestDecoder("GET", url, nil, &data)
	return
}
791773
func (client *storageRESTClient) ListVols() (volinfo []VolInfo, err error) {
	respBody, err := client.call(storageRESTMethodListVols, nil, nil, -1)
	if err != nil {
		return
	}
	defer http.DrainBody(respBody)
	err = gob.NewDecoder(respBody).Decode(&volinfo)
	return volinfo, err
}
414013
func (s *SystemVMService) NewListSystemVmsParams() *ListSystemVmsParams {
	p := &ListSystemVmsParams{}
	p.p = make(map[string]interface{})
	return p
}
517426
func (ls *ListVirtualMachines) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
923376
func (v *volumeSource) ListVolumes(ctx context.ProviderCallContext) ([]string, error) {
	pVolumes := v.client.client().CoreV1().PersistentVolumes()
	vols, err := pVolumes.List(v1.ListOptions{})
	if err != nil {
		return nil, errors.Trace(err)
	}
	volumeIds := make([]string, 0, len(vols.Items))
	for _, v := range vols.Items {
		volumeIds = append(volumeIds, v.Name)
	}
	return volumeIds, nil
}
227442
func (s *NuageVSPService) ListNuageVspDevices(p *ListNuageVspDevicesParams) (*ListNuageVspDevicesResponse, error) {
	resp, err := s.cs.newRequest("listNuageVspDevices", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
1069028
func (s *BgpServer) listVrf() (l []*table.Vrf) {
	s.mgmtOperation(func() error {
		l = make([]*table.Vrf, 0, len(s.globalRib.Vrfs))
		for _, vrf := range s.globalRib.Vrfs {
			l = append(l, vrf.Clone())
		}
		return nil
	}, true)
	return l
}
347119
func (r *ClusterVFS) listNames() ([]string, error) {
	paths, err := r.basePath.ReadTree()
	if err != nil {
		return nil, fmt.Errorf("error reading state store: %v", err)
	}

	var keys []string
	for _, p := range paths {
		relativePath, err := vfs.RelativePath(r.basePath, p)
		if err != nil {
			return nil, err
		}
		if !strings.HasSuffix(relativePath, "/config") {
			continue
		}
		key := strings.TrimSuffix(relativePath, "/config")
		keys = append(keys, key)
	}
	return keys, nil
}
983861
func (*Service) ListVLANs(c context.Context, req *crimson.ListVLANsRequest) (*crimson.ListVLANsResponse, error) {
	ids := make(map[int64]struct{}, len(req.Ids))
	for _, id := range req.Ids {
		ids[id] = struct{}{}
	}
	vlans, err := listVLANs(c, ids, stringset.NewFromSlice(req.Aliases...))
	if err != nil {
		return nil, err
	}
	return &crimson.ListVLANsResponse{
		Vlans: vlans,
	}, nil
}
781071
func (s *VPCService) NewListVPCsParams() *ListVPCsParams {
	p := &ListVPCsParams{}
	p.p = make(map[string]interface{})
	return p
}
127879
func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error) {
	resp, qm, err := k.getInternal(prefix, map[string]string{"recurse": ""}, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()

	var entries []*KVPair
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	return entries, qm, nil
}
1354063
func EnsureKVMs(c context.Context, cfgs []*config.Datacenter, platformIds, rackIds map[string]int64) (map[string]int64, error) {
	t := &KVMsTable{}
	t.platforms = platformIds
	t.racks = rackIds
	if err := t.fetch(c); err != nil {
		return nil, errors.Annotate(err, "failed to fetch KVMs").Err()
	}
	if err := t.computeChanges(c, cfgs); err != nil {
		return nil, errors.Annotate(err, "failed to compute changes").Err()
	}
	if err := t.add(c); err != nil {
		return nil, errors.Annotate(err, "failed to add KVMs").Err()
	}
	if err := t.remove(c); err != nil {
		return nil, errors.Annotate(err, "failed to remove KVMs").Err()
	}
	if err := t.update(c); err != nil {
		return nil, errors.Annotate(err, "failed to update KVMs").Err()
	}
	return t.ids(c), nil
}
157194
func (c *Client) ListKeys(keyPrefix string) (keyval.BytesKeyIterator, error) {
	boltLogger.Debugf("ListKeys: %q", keyPrefix)

	var keys []string
	err := c.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(rootBucket).Cursor()
		prefix := []byte(keyPrefix)

		for k, _ := c.Seek(prefix); k != nil && bytes.HasPrefix(k, prefix); k, _ = c.Next() {
			boltLogger.Debugf(" listing key: %q", string(k))
			keys = append(keys, string(k))
		}

		return nil
	})

	return &bytesKeyIterator{len: len(keys), keys: keys}, err
}
122310
func (f *RemoteRuntime) ListImages(ctx context.Context, req *kubeapi.ListImagesRequest) (*kubeapi.ListImagesResponse, error) {
	images, err := f.ImageService.ListImages(req.Filter)
	if err != nil {
		return nil, err
	}

	return &kubeapi.ListImagesResponse{
		Images: images,
	}, nil
}
771605
func (s *cinderVolumeSource) ListVolumes(ctx context.ProviderCallContext) ([]string, error) {
	cinderVolumes, err := modelCinderVolumes(s.storageAdapter, s.modelUUID)
	if err != nil {
		common.HandleCredentialError(IsAuthorisationFailure, err, ctx)
		return nil, errors.Trace(err)
	}
	return volumeInfoToVolumeIds(cinderToJujuVolumeInfos(cinderVolumes)), nil
}
811432
func (ls *ListVolumes) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}