// CharmInfo returns information about the requested charm.
341594
func (c *Client) CharmInfo(charmURL string) (*CharmInfo, error) {
	args := params.CharmURL{URL: charmURL}
	var info params.CharmInfo
	if err := c.facade.FacadeCall("CharmInfo", args, &info); err != nil {
		return nil, errors.Trace(err)
	}
	meta, err := convertCharmMeta(info.Meta)
	if err != nil {
		return nil, errors.Trace(err)
	}
	result := &CharmInfo{
		Revision:   info.Revision,
		URL:        info.URL,
		Config:     convertCharmConfig(info.Config),
		Meta:       meta,
		Actions:    convertCharmActions(info.Actions),
		Metrics:    convertCharmMetrics(info.Metrics),
		LXDProfile: convertCharmLXDProfile(info.LXDProfile),
	}
	return result, nil
}
589293
func (u *Unit) CharmURL() (*charm.URL, bool) {
	if u.doc.CharmURL == nil {
		return nil, false
	}
	return u.doc.CharmURL, true
}
81793
func (st *State) Charm(curl *charm.URL) (*Charm, error) {
	if curl == nil {
		return nil, fmt.Errorf("charm url cannot be nil")
	}
	return &Charm{
		st:   st,
		curl: curl,
	}, nil
}
1014734
func (api *Client) GetChannelInfo(channelID string) (*Channel, error) {
	return api.GetChannelInfoContext(context.Background(), channelID)
}
190444
func (obj *Doc) GetAllInfos(ctx context.Context) ([]*NxInfo, error) {
	result := &struct {
		Infos []*NxInfo	`json:"qInfos"`
	} {}
	err := obj.rpc(ctx, "GetAllInfos", result)
	return result.Infos, err 
}
504444
func (s *YubiStore) GetKeyInfo(keyID string) (trustmanager.KeyInfo, error) {
	return trustmanager.KeyInfo{}, fmt.Errorf("Not yet implemented")
}
904485
func (s *Service) AddOnWebhookInfo(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookInfoResult, error) {
	var addOnWebhook AddOnWebhookInfoResult
	return &addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), nil, nil)
}
612201
func (m *MockProfileMachine) CharmProfiles() ([]string, error) {
	ret := m.ctrl.Call(m, "CharmProfiles")
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1217737
func (a *Application) CharmURL() (curl *charm.URL, force bool) {
	return a.doc.CharmURL, a.doc.ForceCharm
}
1279930
func (m *Machine) CharmProfilingInfo() (*UnitProfileInfo, error) {
	var result params.CharmProfilingInfoResult
	args := params.Entity{Tag: m.tag.String()}
	err := m.facade.FacadeCall("CharmProfilingInfo", args, &result)
	if err != nil {
		return nil, err
	}
	if result.Error != nil {
		return nil, errors.Trace(result.Error)
	}
	returnResult := &UnitProfileInfo{
		InstanceId:      result.InstanceId,
		ModelName:       result.ModelName,
		CurrentProfiles: result.CurrentProfiles,
	}
	profileChanges := make([]UnitProfileChanges, len(result.ProfileChanges))
	for i, change := range result.ProfileChanges {
		var profile lxdprofile.Profile
		if change.Profile != nil {
			profile = lxdprofile.Profile{
				Config:      change.Profile.Config,
				Description: change.Profile.Description,
				Devices:     change.Profile.Devices,
			}
		}
		profileChanges[i] = UnitProfileChanges{
			ApplicationName: change.ApplicationName,
			Revision:        change.Revision,
			Profile:         profile,
		}
		if change.Error != nil {
			return nil, change.Error
		}
	}
	returnResult.ProfileChanges = profileChanges
	return returnResult, nil
}
874480
func (m *MockProfileBackend) Charm(arg0 *charm_v6.URL) (provisioner.ProfileCharm, error) {
	ret := m.ctrl.Call(m, "Charm", arg0)
	ret0, _ := ret[0].(provisioner.ProfileCharm)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
145841
func (r *Relationer) ContextInfo() *context.RelationInfo {
	members := r.dir.State().Members
	memberNames := make([]string, 0, len(members))
	for memberName := range members {
		memberNames = append(memberNames, memberName)
	}
	return &context.RelationInfo{r.ru, memberNames}
}
164365
func (engine *Engine) TableInfo(bean interface{}) *Table {
	v := rValue(bean)
	return &Table{engine.autoMapType(v), engine.tbName(v)}
}
1058061
func (m *MockModelCacheMachine) CharmProfiles() []string {
	ret := m.ctrl.Call(m, "CharmProfiles")
	ret0, _ := ret[0].([]string)
	return ret0
}
1334140
func (u *Unit) charm() (*Charm, error) {
	curl, ok := u.CharmURL()
	if !ok {
		app, err := u.Application()
		if err != nil {
			return nil, err
		}
		curl = app.doc.CharmURL
	}
	ch, err := u.st.Charm(curl)
	return ch, errors.Annotatef(err, "getting charm for %s", u)
}
405104
func GetAllACIInfos(tx *sql.Tx, sortfields []string, ascending bool) ([]*ACIInfo, error) {
	var aciinfos []*ACIInfo
	query := "SELECT * from aciinfo"
	if len(sortfields) > 0 {
		query += fmt.Sprintf(" ORDER BY %s ", strings.Join(sortfields, ", "))
		if ascending {
			query += "ASC"
		} else {
			query += "DESC"
		}
	}
	rows, err := tx.Query(query)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	for rows.Next() {
		aciinfo := &ACIInfo{}
		if err := aciinfoRowScan(rows, aciinfo); err != nil {
			return nil, err
		}
		aciinfos = append(aciinfos, aciinfo)
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return aciinfos, err
}
1278930
func (api *API) Info() serverInfo {
	si := api.server.systemInfo
	// we don't report errors on failures to get this information
	physicalCores, logicalCores, _ := si.CPUCores()
	mhz, _ := si.CPUMHz()
	mem, _ := si.MemTotal()
	return serverInfo{
		ShardWidth:       ShardWidth,
		CPUPhysicalCores: physicalCores,
		CPULogicalCores:  logicalCores,
		CPUMHz:           mhz,
		CPUType:          si.CPUModel(),
		Memory:           mem,
	}
}