// ListRequestSettings returns the list of request settings for the
// configuration version.
500302
func (c *Client) ListRequestSettings(i *ListRequestSettingsInput) ([]*RequestSetting, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

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

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

	var bs []*RequestSetting
	if err := decodeJSON(&bs, resp.Body); err != nil {
		return nil, err
	}
	sort.Stable(requestSettingsByName(bs))
	return bs, nil
}
117755
func (c *Client) ListVhosts() (rec []VhostInfo, err error) {
	req, err := newGETRequest(c, "vhosts")
	if err != nil {
		return []VhostInfo{}, err
	}

	if err = executeAndParseRequest(c, req, &rec); err != nil {
		return []VhostInfo{}, err
	}

	return rec, nil
}
857122
func (so ServiceOffering) ListRequest() (ListCommand, error) {
	// Restricted cannot be applied here because it really has three states
	req := &ListServiceOfferings{
		ID:           so.ID,
		Name:         so.Name,
		SystemVMType: so.SystemVMType,
	}

	if so.IsSystem {
		req.IsSystem = &so.IsSystem
	}

	return req, nil
}
1257552
func GetParameterRequestList(o dhcp4.Options) OptionCodes {
	v := o.Get(dhcp4.OptionParameterRequestList)
	if v == nil {
		return nil
	}
	var oc OptionCodes
	if err := (&oc).UnmarshalBinary(v); err != nil {
		return nil
	}
	return oc
}
262892
func (*Service) ListVMs(c context.Context, req *crimson.ListVMsRequest) (*crimson.ListVMsResponse, error) {
	vms, err := listVMs(c, database.Get(c), req)
	if err != nil {
		return nil, err
	}
	return &crimson.ListVMsResponse{
		Vms: vms,
	}, nil
}
662894
func httpListPolicys(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpListPolicys: %+v", vars)

	list := make([]*Policy, 0)
	collections.policyMutex.Lock()
	defer collections.policyMutex.Unlock()
	for _, obj := range collections.policys {
		list = append(list, obj)
	}

	// Return the list
	return list, nil
}
545979
func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

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

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

	var cs []*CacheSetting
	if err := decodeJSON(&cs, resp.Body); err != nil {
		return nil, err
	}
	sort.Stable(cacheSettingsByName(cs))
	return cs, nil
}
753894
func (c *Client) ListPermissions() (rec []PermissionInfo, err error) {
	req, err := newGETRequest(c, "permissions/")
	if err != nil {
		return []PermissionInfo{}, err
	}

	if err = executeAndParseRequest(c, req, &rec); err != nil {
		return []PermissionInfo{}, err
	}

	return rec, nil
}
337953
func (s *ConfigurationService) ListConfigurations(p *ListConfigurationsParams) (*ListConfigurationsResponse, error) {
	resp, err := s.cs.newRequest("listConfigurations", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
78392
func (cs *RPCService) List(r *http.Request, args *ListArgs, reply *ListReply) error {
	cfgs, err := cs.Configs(args)
	if err != nil {
		return err
	}
	for _, v := range cfgs {
		reply.Configs = append(reply.Configs, v)
	}
	return nil
}
216495
func (ls *ListServiceOfferings) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
184023
func (clientSettings *ClientSettings) GetClientSettings() error {
	req, err := client.NewRequest(Config, "GET", "/papi/v1/client-settings", nil)
	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)
	if err != nil {
		return err
	}

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	if err := client.BodyJSON(res, clientSettings); err != nil {
		return err
	}

	return nil
}
660672
func (ls *ListResourceLimits) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
1242122
func (c *Client) ListBindings() (rec []BindingInfo, err error) {
	req, err := newGETRequest(c, "bindings/")
	if err != nil {
		return []BindingInfo{}, err
	}

	if err = executeAndParseRequest(c, req, &rec); err != nil {
		return []BindingInfo{}, err
	}

	return rec, nil
}
582331
func (s *HypervisorService) ListHypervisorCapabilities(p *ListHypervisorCapabilitiesParams) (*ListHypervisorCapabilitiesResponse, error) {
	resp, err := s.cs.newRequest("listHypervisorCapabilities", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	return &r, nil
}
507279
func (ls *ListSecurityGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
555140
func PolicyListRequest(method, path, request string) (*PolicyList, error) {
	return hns.PolicyListRequest(method, path, request)
}