juju: github.com/juju/juju/core/series Index | Files

package series

import "github.com/juju/juju/core/series"


Package Files

supported.go supportedseries.go validate.go


const (
    // Daily defines if a image-stream is set to this, then you get a different
    // set of logic. In this case if you want to test drive new releases, it's
    // required that the image-stream modelconfig is set from released to
    // daily.
    Daily = "daily"

func ControllerSeries Uses

func ControllerSeries(now time.Time, requestedSeries, imageStream string) (set.Strings, error)

ControllerSeries returns all the controller series available to it at the execution time.

func DefaultSeries Uses

func DefaultSeries() map[SeriesName]SeriesVersion

DefaultSeries returns back all the series that Juju is aware of.

func SetSupported Uses

func SetSupported(series map[SeriesName]SeriesVersion, name string) bool

SetSupported updates a series map based on the series name and sets it to be supported.

func ValidateSeries Uses

func ValidateSeries(supportedSeries set.Strings, series, fallbackPreferredSeries string) (string, error)

ValidateSeries attempts to validate a series if one is found, otherwise it uses the fallback series and validates that one. Returns the series it validated against or an error if one is found. Note: the selected series will be returned if there is an error to help use that for a fallback during error scenarios.

func WorkloadSeries Uses

func WorkloadSeries(now time.Time, requestedSeries, imageStream string) (set.Strings, error)

WorkloadSeries returns all the workload series available to it at the execution time.

type DistroSource Uses

type DistroSource interface {
    // Refresh will attempt to update the information it has about each distro
    // and if the distro is supported or not.
    Refresh() error

    // SeriesInfo returns the DistroInfoSerie for the series name.
    SeriesInfo(seriesName string) (series.DistroInfoSerie, bool)

DistroSource is the source of the underlying distro source for supported series.

type SeriesName Uses

type SeriesName string

SeriesName represents a series name for distros

const (
    Precise SeriesName = "precise"
    Quantal SeriesName = "quantal"
    Raring  SeriesName = "raring"
    Saucy   SeriesName = "saucy"
    Trusty  SeriesName = "trusty"
    Utopic  SeriesName = "utopic"
    Vivid   SeriesName = "vivid"
    Wily    SeriesName = "wily"
    Xenial  SeriesName = "xenial"
    Yakkety SeriesName = "yakkety"
    Zesty   SeriesName = "zesty"
    Artful  SeriesName = "artful"
    Bionic  SeriesName = "bionic"
    Cosmic  SeriesName = "cosmic"
    Disco   SeriesName = "disco"
    Eoan    SeriesName = "eoan"
    Focal   SeriesName = "focal"

TODO (stickupkid): We should get all of these from the os/series package.

const (
    Win2008r2    SeriesName = "win2008r2"
    Win2012hvr2  SeriesName = "win2012hvr2"
    Win2012hv    SeriesName = "win2012hv"
    Win2012r2    SeriesName = "win2012r2"
    Win2012      SeriesName = "win2012"
    Win2016      SeriesName = "win2016"
    Win2016hv    SeriesName = "win2016hv"
    Win2016nano  SeriesName = "win2016nano"
    Win2019      SeriesName = "win2019"
    Win7         SeriesName = "win7"
    Win8         SeriesName = "win8"
    Win81        SeriesName = "win81"
    Win10        SeriesName = "win10"
    Centos7      SeriesName = "centos7"
    Centos8      SeriesName = "centos8"
    OpenSUSELeap SeriesName = "opensuseleap"
    GenericLinux SeriesName = "genericlinux"
    Kubernetes   SeriesName = "kubernetes"

TODO (stickupkid): We should get all of these from the os/series package.

func (SeriesName) String Uses

func (s SeriesName) String() string

type SeriesVersion Uses

type SeriesVersion struct {
    // WorkloadType defines what type the series version is intended to work
    // against.
    WorkloadType WorkloadType

    // Version represents the version of the series.
    Version string

    // LTS provides a lookup for a LTS series.  Like seriesVersions,
    // the values here are current at the time of writing.
    LTS bool

    // Supported defines if Juju classifies the series as officially supported.
    Supported bool

    // Extended security maintenance for customers, extends the supported bool
    // for how Juju classifies the series.
    ESMSupported bool

    // IgnoreDistroInfoUpdate overrides the supported value to ensure that we
    // can force supported series, by ignoring the distro info update.
    IgnoreDistroInfoUpdate bool

    // UpdatedByLocalDistroInfo indicates that the series version was created
    // by the local distro-info information on the system.
    // This is useful to understand why a version appears yet is not supported.
    UpdatedByLocalDistroInfo bool

SeriesVersion represents a ubuntu series that includes the version, if the series is an LTS and the supported defines if Juju supports the series version.

type SupportedInfo Uses

type SupportedInfo struct {
    // contains filtered or unexported fields

SupportedInfo represents all the supported info available.

func NewSupportedInfo Uses

func NewSupportedInfo(source DistroSource, preset map[SeriesName]SeriesVersion) *SupportedInfo

NewSupportedInfo creates a supported info type for knowning if a series is supported or not.

func (*SupportedInfo) Compile Uses

func (s *SupportedInfo) Compile(now time.Time) error

Compile compiles a list of supported info.

func (*SupportedInfo) ControllerSeries Uses

func (s *SupportedInfo) ControllerSeries() []string

ControllerSeries returns a slice of series that are supported to run on a controller.

func (*SupportedInfo) WorkloadSeries Uses

func (s *SupportedInfo) WorkloadSeries() []string

WorkloadSeries returns a slice of series that are supported to run on a target workload (charm). Note: workload series will also include controller workload types, as they can also be used for workloads.

type SupportedSeriesFunc Uses

type SupportedSeriesFunc = func(time.Time, string, string) (set.Strings, error)

SupportedSeriesFunc describes a function that has commonality between controller and workload types.

type WorkloadType Uses

type WorkloadType int

WorkloadType defines what type of workload the series is aimed at. Controllers only support Ubuntu systems.

const (
    // ControllerWorkloadType defines a workload type that is for controllers
    // only.
    ControllerWorkloadType WorkloadType = iota

    // OtherWorkloadType workload type is for everything else.
    // In the future we might want to differentiate this.

Package series imports 5 packages (graph) and is imported by 9 packages. Updated 2020-07-22. Refresh now. Tools for package owners.