juju: github.com/juju/juju/apiserver/facades/agent/upgradeseries Index | Files

package upgradeseries

import "github.com/juju/juju/apiserver/facades/agent/upgradeseries"

Index

Package Files

upgradeseries.go

type API Uses

type API struct {
    *common.UpgradeSeriesAPI
    // contains filtered or unexported fields
}

API serves methods required by the machine agent upgrade-series worker.

func NewAPI Uses

func NewAPI(ctx facade.Context) (*API, error)

NewAPI creates a new instance of the API with the given context

func NewUpgradeSeriesAPI Uses

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) CurrentSeries Uses

func (a *API) CurrentSeries(args params.Entities) (params.StringResults, error)

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.

func (*API) FinishUpgradeSeries Uses

func (a *API) FinishUpgradeSeries(args params.UpdateSeriesArgs) (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-series lock.

func (*API) MachineStatus Uses

func (a *API) MachineStatus(args params.Entities) (params.UpgradeSeriesStatusResults, error)

MachineStatus gets the current upgrade-series status of a machine.

func (*API) PinMachineApplications Uses

func (a *API) PinMachineApplications() (params.PinApplicationsResults, error)

PinMachineApplications pins leadership for applications represented by units running on the auth'd machine.

func (*API) PinnedLeadership Uses

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 Uses

func (a *API) SetInstanceStatus(args params.SetStatus) (params.ErrorResults, error)

SetInstanceStatus sets the status of the machine.

func (*API) SetMachineStatus Uses

func (a *API) SetMachineStatus(args params.UpgradeSeriesStatusParams) (params.ErrorResults, error)

SetMachineStatus sets the current upgrade-series status of a machine.

func (*API) StartUnitCompletion Uses

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) TargetSeries Uses

func (a *API) TargetSeries(args params.Entities) (params.StringResults, error)

TargetSeries returns the series that a machine has been locked for upgrading to.

func (*API) UnitsCompleted Uses

func (a *API) UnitsCompleted(args params.Entities) (params.EntitiesResults, error)

UnitsCompleted returns the units running on this machine that have completed the upgrade-series workflow and are in their normal running state.

func (*API) UnitsPrepared Uses

func (a *API) UnitsPrepared(args params.Entities) (params.EntitiesResults, error)

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.

func (*API) UnpinMachineApplications Uses

func (a *API) UnpinMachineApplications() (params.PinApplicationsResults, error)

UnpinMachineApplications unpins leadership for applications represented by units running on the auth'd machine.

type APIv1 Uses

type APIv1 struct {
    *APIv2
}

APIv1 provides the upgrade-series API facade for version 1.

func NewAPIv1 Uses

func NewAPIv1(ctx facade.Context) (*APIv1, error)

NewAPIv1 is a wrapper that creates a V1 upgrade-series API.

func (*APIv1) CurrentSeries Uses

func (api *APIv1) CurrentSeries(_, _ struct{})

CurrentSeries was not available on version 1 of the API.

type APIv2 Uses

type APIv2 struct {
    *API
}

APIv2 provides the upgrade-series API facade for version 2.

func NewAPIv2 Uses

func NewAPIv2(ctx facade.Context) (*APIv2, error)

NewAPIv2 is a wrapper that creates a V2 upgrade-series API.

func (*APIv2) SetInstanceStatus Uses

func (api *APIv2) SetInstanceStatus(_, _ struct{})

SetInstanceStatus was not available on version 2 of the API.

Package upgradeseries imports 9 packages (graph) and is imported by 4 packages. Updated 2020-07-20. Refresh now. Tools for package owners.