Documentation ¶
Overview ¶
series provides helpers for determining the series of a host, and translating from os to series.
Index ¶
- Variables
- func CentOSVersionSeries(version string) (string, error)
- func GetOSFromSeries(series string) (os.OSType, error)
- func HostSeries() (string, error)
- func IsUnknownOSForSeriesError(err error) bool
- func IsUnknownSeriesVersionError(err error) bool
- func IsUnknownVersionSeriesError(err error) bool
- func IsWindowsNano(series string) bool
- func LatestLts() string
- func MustOSFromSeries(series string) os.OSType
- func OSSupportedSeries(os os.OSType) []string
- func ReleaseVersion() string
- func SeriesVersion(series string) (string, error)
- func SetLatestLtsForTesting(series string) string
- func SupportedLts() []string
- func SupportedSeries() []string
- func UpdateSeriesVersions() error
- func VersionSeries(version string) (string, error)
- func WindowsVersionSeries(version string) (string, error)
- func WindowsVersions() map[string]string
Constants ¶
This section is empty.
Variables ¶
var ( // TODO(katco): Remove globals (lp:1633571) // Override for testing. MustHostSeries = mustHostSeries )
Functions ¶
func CentOSVersionSeries ¶
CentOSVersionSeries validates that the supplied series (eg: centos7) is supported.
func GetOSFromSeries ¶
GetOSFromSeries will return the operating system based on the series that is passed to it
func HostSeries ¶
HostSeries returns the series of the machine the current process is running on.
func IsUnknownOSForSeriesError ¶
IsUnknownOSForSeriesError returns true if err is of type unknownOSForSeriesError.
func IsUnknownSeriesVersionError ¶
IsUnknownSeriesVersionError returns true if err is of type unknownSeriesVersionError.
func IsUnknownVersionSeriesError ¶
IsUnknownVersionSeriesError returns true if err is of type unknownVersionSeriesError.
func IsWindowsNano ¶
IsWindowsNano tells us whether the provided series is a nano series. It may seem futile at this point, but more nano series will come up with time. This is here and not in a windows specific package because we might want to take decisions dependant on whether we have a nano series or not in more general code.
func LatestLts ¶
func LatestLts() string
LatestLts returns the Latest LTS Series found in distro-info
func MustOSFromSeries ¶
MustOSFromSeries will panic if the series represents an "unknown" operating system
func OSSupportedSeries ¶
OSSupportedSeries returns the series of the specified OS on which we can run Juju workloads.
func ReleaseVersion ¶
func ReleaseVersion() string
ReleaseVersion looks for the value of VERSION_ID in the content of the os-release. If the value is not found, the file is not found, or an error occurs reading the file, an empty string is returned.
func SeriesVersion ¶
SeriesVersion returns the version for the specified series.
func SetLatestLtsForTesting ¶
SetLatestLtsForTesting is provided to allow tests to override the lts series used and decouple the tests from the host by avoiding calling out to distro-info. It returns the previous setting so that it may be set back to the original value by the caller.
func SupportedLts ¶
func SupportedLts() []string
SupportedLts are the current supported LTS series in ascending order.
func SupportedSeries ¶
func SupportedSeries() []string
SupportedSeries returns the series on which we can run Juju workloads.
func UpdateSeriesVersions ¶
func UpdateSeriesVersions() error
UpdateSeriesVersions forces an update of the series versions by querying distro-info if possible.
func VersionSeries ¶
VersionSeries returns the series (e.g.trusty) for the specified version (e.g. 14.04).
func WindowsVersionSeries ¶
WindowsVersionSeries returns the series (eg: win2012r2) for the specified version (eg: Windows Server 2012 R2 Standard)
func WindowsVersions ¶
WindowsVersions returns all windows versions as a map
Types ¶
This section is empty.