API serves methods required by the machine agent upgrade-series worker.
NewAPI creates a new instance of the API with the given context
func NewUpgradeSeriesAPI( st common.UpgradeSeriesBackend, resources facade.Resources, authorizer facade.Authorizer, leadership *common.LeadershipPinning, ) (*API, error)
NewUpgradeSeriesAPI creates a new instance of the API server using the dedicated state indirection.
CurrentSeries returns what Juju thinks the current series of the machine is. Note that a machine could have been upgraded out-of-band by running do-release-upgrade outside of the upgrade-series workflow, making this value incorrect.
FinishUpgradeSeries is the last action in the upgrade workflow and is called after all machine and unit statuses are "completed". It updates the machine series to reflect the completed upgrade, then removes the upgrade-series lock.
MachineStatus gets the current upgrade-series status of a machine.
PinMachineApplications pins leadership for applications represented by units running on the auth'd machine.
PinnedLeadership returns all pinned applications and the entities that require their pinned behaviour, for leadership in the current model.
SetInstanceStatus sets the status of the machine.
SetMachineStatus sets the current upgrade-series status of a machine.
func (a *API) StartUnitCompletion(args params.UpgradeSeriesStartUnitCompletionParam) (params.ErrorResults, error)
StartUnitCompletion starts the upgrade series completion phase for all subordinate units of a given machine.
TargetSeries returns the series that a machine has been locked for upgrading to.
UnitsCompleted returns the units running on this machine that have completed the upgrade-series workflow and are in their normal running state.
UnitsPrepared returns the units running on this machine that have completed their upgrade-series preparation, and are ready to be stopped and have their unit agent services converted for the target series.
UnpinMachineApplications unpins leadership for applications represented by units running on the auth'd machine.
APIv1 provides the upgrade-series API facade for version 1.
NewAPIv1 is a wrapper that creates a V1 upgrade-series API.
CurrentSeries was not available on version 1 of the API.
APIv2 provides the upgrade-series API facade for version 2.
NewAPIv2 is a wrapper that creates a V2 upgrade-series API.
SetInstanceStatus was not available on version 2 of the API.