// AgentVersion implements Backend.
977714
func (s *backendShim) AgentVersion() (version.Number, error) {
	m, err := s.Model()
	if err != nil {
		return version.Zero, errors.Trace(err)
	}

	cfg, err := m.ModelConfig()
	if err != nil {
		return version.Zero, errors.Trace(err)
	}
	vers, ok := cfg.AgentVersion()
	if !ok {
		return version.Zero, errors.New("no agent version")
	}
	return vers, nil
}
1096749
func (c Context) TLSVersion() (ret string) {
	if c.Req.TLS != nil {
		// Safe to ignore an error
		ret, _ = caddytls.GetSupportedProtocolName(c.Req.TLS.Version)
	}
	return
}
37778
func (s *UpdateInstanceInput) SetAgentVersion(v string) *UpdateInstanceInput {
	s.AgentVersion = &v
	return s
}
797992
func Version(url string, kvdbOptions map[string]string) (string, error) {
	// Currently we support only v1
	return kvdb.ConsulVersion1, nil
}
873934
func (client *Client) WithVersion(version string) *Client {
	client.SetVersion(version)
	return client
}
1055975
func (s *VersionInfo) SetAgentVersion(v string) *VersionInfo {
	s.AgentVersion = &v
	return s
}
474004
func (m *Model) AgentVersion() (version.Number, error) {
	cfg, err := m.ModelConfig()
	if err != nil {
		return version.Number{}, errors.Trace(err)
	}
	ver, ok := cfg.AgentVersion()
	if !ok {
		return version.Number{}, errors.NotFoundf("agent version")
	}
	return ver, nil
}
225825
func (c *Client) Version() (*Version, error) {
	v := &Version{}
	if _, err := c.ExecCmd(NewCmd("version").WithResponse(v)); err != nil {
		return nil, err
	}

	return v, nil
}
312883
func (c *Client) Upgrade(agentTag string, v version.Number) error {
	var result params.ErrorResult
	arg := params.KubernetesUpgradeArg{
		AgentTag: agentTag,
		Version:  v,
	}
	if err := c.facade.FacadeCall("UpgradeOperator", arg, &result); err != nil {
		return errors.Trace(err)
	}
	if result.Error != nil {
		return errors.Trace(result.Error)
	}
	return nil
}
75265
func (s *CreateInstanceInput) SetAgentVersion(v string) *CreateInstanceInput {
	s.AgentVersion = &v
	return s
}
82653
func (c *ConfigLocal) MetadataVersion() kbfsmd.MetadataVer {
	c.lock.RLock()
	defer c.lock.RUnlock()
	return c.metadataVersion
}
1232854
func VERSION(v *Version) {
	v.Major = MAJOR_VERSION
	v.Minor = MINOR_VERSION
	v.Patch = PATCHLEVEL
}
1111021
func (u *Unit) SetAgentVersion(v version.Binary) (err error) {
	defer errors.DeferredAnnotatef(&err, "cannot set agent version for unit %q", u)
	if err = checkVersionValidity(v); err != nil {
		return err
	}
	versionedTool := &tools.Tools{Version: v}
	ops := []txn.Op{{
		C:      unitsC,
		Id:     u.doc.DocID,
		Assert: notDeadDoc,
		Update: bson.D{{"$set", bson.D{{"tools", versionedTool}}}},
	}}
	if err := u.st.db().RunTransaction(ops); err != nil {
		return onAbort(err, ErrDead)
	}
	u.doc.Tools = versionedTool
	return nil
}
751243
func (s *AgentInfo) SetVersion(v string) *AgentInfo {
	s.Version = &v
	return s
}
134003
func (b *Broker) ApiVersions(request *ApiVersionsRequest) (*ApiVersionsResponse, error) {
	response := new(ApiVersionsResponse)

	err := b.sendAndReceive(request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
862467
func (m *MockRestClientInterface) APIVersion() schema.GroupVersion {
	ret := m.ctrl.Call(m, "APIVersion")
	ret0, _ := ret[0].(schema.GroupVersion)
	return ret0
}
211823
func (s *StoredProperties) CCVersion() (string, bool) {
	val, ok := s.Props[CCVERSION]
	return val, ok
}