// MongoVersion allows the introspection of the mongo version per controller
499376
func (c *ControllerAPI) MongoVersion() (params.StringResult, error) {
	result := params.StringResult{}
	if err := c.checkHasAdmin(); err != nil {
		return result, errors.Trace(err)
	}
	version, err := c.state.MongoVersion()
	if err != nil {
		return result, errors.Trace(err)
	}
	result.Result = version
	return result, nil
}
292484
func (collection StepCollectionModel) GetStepVersion(id, version string) (StepVersionModel, bool, bool) {
	stepHash := collection.Steps
	stepVersions, stepFound := stepHash[id]

	if !stepFound {
		return StepVersionModel{}, stepFound, false
	}

	if version == "" {
		version = stepVersions.LatestVersionNumber
	}

	step, versionFound := stepVersions.Versions[version]

	if !stepFound || !versionFound {
		return StepVersionModel{}, stepFound, versionFound
	}

	return StepVersionModel{
		Step:                   step,
		Version:                version,
		LatestAvailableVersion: stepVersions.LatestVersionNumber,
	}, true, true
}
1286201
func (d *DevTools) Version(ctx context.Context) (*Version, error) {
	resp, err := d.httpGet(ctx, "/json/version")
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return nil, parseError("Version", resp.Body)
	}

	v := new(Version)
	return v, json.NewDecoder(resp.Body).Decode(&v)
}
1234435
func (md *RootMetadataV2) Version() MetadataVer {
	// Only folders with unresolved assertions or conflict info get the
	// new version.
	if len(md.Extra.UnresolvedWriters) > 0 || len(md.UnresolvedReaders) > 0 ||
		md.ConflictInfo != nil ||
		md.FinalizedInfo != nil {
		return InitialExtraMetadataVer
	}
	// Let other types of MD objects use the older version since they
	// are still compatible with older clients.
	return PreExtraMetadataVer
}
76540
func (s *Scheme) ObjectVersionAndKind(obj Object) (version, kind string, err error) {
	return s.raw.ObjectVersionAndKind(obj)
}
198976
func (c *Client) ElasticsearchVersion(url string) (string, error) {
	res, _, err := c.Ping().URL(url).Do()
	if err != nil {
		return "", err
	}
	return res.Version.Number, nil
}
373393
func (p *PKGBUILD) Version() string {
	if p.Epoch > 0 {
		return fmt.Sprintf("%d:%s-%s", p.Epoch, p.Pkgver, p.Pkgrel)
	}

	return fmt.Sprintf("%s-%s", p.Pkgver, p.Pkgrel)
}
924183
func (st *State) GUIVersion() (vers version.Number, err error) {
	settings, closer := st.db().GetCollection(guisettingsC)
	defer closer()

	// Retrieve the settings document.
	var doc guiSettingsDoc
	err = settings.Find(nil).Select(bson.D{{"current-version", 1}}).One(&doc)
	if err == nil {
		return doc.CurrentVersion, nil
	}
	if err == mgo.ErrNotFound {
		return vers, errors.NotFoundf("Juju GUI version")
	}
	return vers, errors.Trace(err)
}
797992
func Version(url string, kvdbOptions map[string]string) (string, error) {
	// Currently we support only v1
	return kvdb.ConsulVersion1, nil
}
1155200
func (tracker *VoteTracker) Version() uint32 {
	tracker.mtx.RLock()
	defer tracker.mtx.RUnlock()
	return tracker.version
}
1210183
func (m *Machine) SetStopMongoUntilVersion(v mongo.Version) error {
	ops := []txn.Op{{
		C:      machinesC,
		Id:     m.doc.DocID,
		Update: bson.D{{"$set", bson.D{{"stopmongountilversion", v.String()}}}},
	}}
	if err := m.st.db().RunTransaction(ops); err != nil {
		return fmt.Errorf("cannot set StopMongoUntilVersion %v: %v", m, onAbort(err, ErrDead))
	}
	m.doc.StopMongoUntilVersion = v.String()
	return nil
}
874620
func (s *Association) SetDocumentVersion(v string) *Association {
	s.DocumentVersion = &v
	return s
}
955321
func ParseVersion(version string) (v *Version, err error) {

	v = &Version{}
	return v, v.ParseVersion(version)
}
790935
func (b *UpdateService) Version(version int64) *UpdateService {
	b.version = &version
	return b
}
85903
func DBVersion(db *sql.DB) (ver DatabaseVersion, err error) {
	err = db.QueryRow(internal.SelectMetaDBVersions).Scan(&ver.compat, &ver.schema, &ver.maint)
	return
}
180985
func Version(buildVer, buildDate, commitHash string) Option {
	return func(o *Options) {
		BuildVersion = buildVer
		BuildDate = buildDate
		CommitHash = commitHash
	}
}
1231384
func (m *MockConfig) MongoVersion() mongo.Version {
	ret := m.ctrl.Call(m, "MongoVersion")
	ret0, _ := ret[0].(mongo.Version)
	return ret0
}