Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UpgradeSeriesStatusOrder = map[UpgradeSeriesStatus]int{
UpgradeSeriesNotStarted: 0,
UpgradeSeriesPrepareStarted: 1,
UpgradeSeriesPrepareRunning: 2,
UpgradeSeriesPrepareCompleted: 3,
UpgradeSeriesCompleteStarted: 4,
UpgradeSeriesCompleteRunning: 5,
UpgradeSeriesCompleted: 6,
UpgradeSeriesError: 7,
}
Functions ¶
func CompareUpgradeSeriesStatus ¶
func CompareUpgradeSeriesStatus(status1 UpgradeSeriesStatus, status2 UpgradeSeriesStatus) (int, error)
CompareUpgradeSeriesStatus compares two upgrade series statuses and returns an integer; if the first argument equals the second then 0 is returned; if the second is greater -1 is returned; 1 is returned otherwise. An error is returned if either argument is an invalid status.
func ValidateSeries ¶
ValidateSeries ensures the charm series is valid for the model type.
Types ¶
type GenerationVersion ¶
type GenerationVersion string
GenerationVersion indicates a generation to use for model config.
const ( // GenerationCurrent indicates the current generation for model config. // This is the default state of a model. GenerationCurrent GenerationVersion = "current" // GenerationNext indicates the next generation of model config. // Models with an active "next" generation apply the generation config // selectively to units added to the generation. GenerationNext GenerationVersion = "next" )
func (GenerationVersion) String ¶
func (g GenerationVersion) String() string
type Model ¶
type Model struct { // Name returns the human friendly name of the model. Name string // UUID is the universally unique identifier of the model. UUID string // ModelType is the type of model. ModelType ModelType }
Model represents the state of a model.
type UpgradeSeriesStatus ¶
type UpgradeSeriesStatus string
UpgradeSeriesStatus is the current status of a series upgrade for units
const ( UpgradeSeriesNotStarted UpgradeSeriesStatus = "not started" UpgradeSeriesPrepareStarted UpgradeSeriesStatus = "prepare started" UpgradeSeriesPrepareRunning UpgradeSeriesStatus = "prepare running" UpgradeSeriesPrepareCompleted UpgradeSeriesStatus = "prepare completed" UpgradeSeriesCompleteStarted UpgradeSeriesStatus = "complete started" UpgradeSeriesCompleteRunning UpgradeSeriesStatus = "complete running" UpgradeSeriesCompleted UpgradeSeriesStatus = "completed" UpgradeSeriesError UpgradeSeriesStatus = "error" )
func ValidateUpgradeSeriesStatus ¶
func ValidateUpgradeSeriesStatus(status UpgradeSeriesStatus) (UpgradeSeriesStatus, error)
ValidateUpgradeSeriesStatus validates a the input status as valid for a unit, returning the valid status or an error.
Click to show internal directories.
Click to hide internal directories.