Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type API
- func (a *API) FinishUpgradeSeries(args params.UpdateChannelArgs) (params.ErrorResults, error)
- func (a *API) MachineStatus(args params.Entities) (params.UpgradeSeriesStatusResults, error)
- func (a *API) PinMachineApplications() (params.PinApplicationsResults, error)
- func (a *API) PinnedLeadership() (params.PinnedLeadershipResult, error)
- func (a *API) SetInstanceStatus(args params.SetStatus) (params.ErrorResults, error)
- func (a *API) SetMachineStatus(args params.UpgradeSeriesStatusParams) (params.ErrorResults, error)
- func (a *API) StartUnitCompletion(args params.UpgradeSeriesStartUnitCompletionParam) (params.ErrorResults, error)
- func (a *API) UnitsCompleted(args params.Entities) (params.EntitiesResults, error)
- func (a *API) UnitsPrepared(args params.Entities) (params.EntitiesResults, error)
- func (a *API) UnpinMachineApplications() (params.PinApplicationsResults, error)
- type APIv3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type API ¶
type API struct { *common.UpgradeSeriesAPI // contains filtered or unexported fields }
API serves methods required by the machine agent upgrade-machine worker.
func NewUpgradeSeriesAPI ¶
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.
func (*API) FinishUpgradeSeries ¶
func (a *API) FinishUpgradeSeries(args params.UpdateChannelArgs) (params.ErrorResults, error)
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-machine lock.
func (*API) MachineStatus ¶
MachineStatus gets the current upgrade-machine status of a machine.
func (*API) PinMachineApplications ¶
func (a *API) PinMachineApplications() (params.PinApplicationsResults, error)
PinMachineApplications pins leadership for applications represented by units running on the auth'd machine.
func (*API) PinnedLeadership ¶
func (a *API) PinnedLeadership() (params.PinnedLeadershipResult, error)
PinnedLeadership returns all pinned applications and the entities that require their pinned behaviour, for leadership in the current model.
func (*API) SetInstanceStatus ¶
SetInstanceStatus sets the status of the machine.
func (*API) SetMachineStatus ¶
func (a *API) SetMachineStatus(args params.UpgradeSeriesStatusParams) (params.ErrorResults, error)
SetMachineStatus sets the current upgrade-machine status of a machine.
func (*API) StartUnitCompletion ¶
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.
func (*API) UnitsCompleted ¶
UnitsCompleted returns the units running on this machine that have completed the upgrade-machine workflow and are in their normal running state.
func (*API) UnitsPrepared ¶
UnitsPrepared returns the units running on this machine that have completed their upgrade-machine preparation, and are ready to be stopped and have their unit agent services converted for the target series.
func (*API) UnpinMachineApplications ¶
func (a *API) UnpinMachineApplications() (params.PinApplicationsResults, error)
UnpinMachineApplications unpins leadership for applications represented by units running on the auth'd machine.
type APIv3 ¶
type APIv3 struct {
*API
}
func (*APIv3) CurrentSeries ¶
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-machine workflow, making this value incorrect.
func (*APIv3) TargetSeries ¶
TargetSeries returns the series that a machine has been locked for upgrading to.