machinemanager

package
v0.0.0-...-8ff1004 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	state.CloudAccessor

	Machine(string) (Machine, error)
	Model() (Model, error)
	GetBlockForType(t state.BlockType) (state.Block, bool, error)
	AddOneMachine(template state.MachineTemplate) (*state.Machine, error)
	AddMachineInsideNewMachine(template, parentTemplate state.MachineTemplate, containerType instance.ContainerType) (*state.Machine, error)
	AddMachineInsideMachine(template state.MachineTemplate, parentId string, containerType instance.ContainerType) (*state.Machine, error)
}

type Machine

type Machine interface {
	Destroy() error
	ForceDestroy() error
	Series() string
	Units() ([]Unit, error)
	SetKeepInstance(keepInstance bool) error
	CreateUpgradeSeriesLock([]string, string) error
	RemoveUpgradeSeriesLock() error
	CompleteUpgradeSeries() error
	VerifyUnitsSeries(unitNames []string, series string, force bool) ([]Unit, error)
	Principals() []string
	WatchUpgradeSeriesNotifications() (state.NotifyWatcher, error)
	GetUpgradeSeriesMessages() ([]string, bool, error)
	IsManager() bool
}

type MachineManagerAPI

type MachineManagerAPI struct {
	// contains filtered or unexported fields
}

MachineManagerAPI provides access to the MachineManager API facade.

func NewFacade

func NewFacade(ctx facade.Context) (*MachineManagerAPI, error)

NewFacade create a new server-side MachineManager API facade. This is used for facade registration.

func NewMachineManagerAPI

func NewMachineManagerAPI(
	backend Backend,
	storageAccess storageInterface,
	pool Pool,
	auth facade.Authorizer,
	modelTag names.ModelTag,
	callCtx context.ProviderCallContext,
	resources facade.Resources,
) (*MachineManagerAPI, error)

NewMachineManagerAPI creates a new server-side MachineManager API facade.

func (*MachineManagerAPI) AddMachines

AddMachines adds new machines with the supplied parameters.

func (*MachineManagerAPI) DestroyMachine

func (mm *MachineManagerAPI) DestroyMachine(args params.Entities) (params.DestroyMachineResults, error)

DestroyMachine removes a set of machines from the model.

func (*MachineManagerAPI) DestroyMachineWithParams

func (mm *MachineManagerAPI) DestroyMachineWithParams(args params.DestroyMachinesParams) (params.DestroyMachineResults, error)

DestroyMachineWithParams removes a set of machines from the model.

func (*MachineManagerAPI) ForceDestroyMachine

func (mm *MachineManagerAPI) ForceDestroyMachine(args params.Entities) (params.DestroyMachineResults, error)

ForceDestroyMachine forcibly removes a set of machines from the model.

func (*MachineManagerAPI) GetUpgradeSeriesMessages

GetUpgradeSeriesMessages returns all new messages associated with upgrade series events. Messages that have already been retrieved once are not returned by this method.

func (*MachineManagerAPI) InstanceTypes

InstanceTypes returns instance type information for the cloud and region in which the current model is deployed.

func (*MachineManagerAPI) UpgradeSeriesComplete

func (mm *MachineManagerAPI) UpgradeSeriesComplete(args params.UpdateSeriesArg) (params.ErrorResult, error)

UpgradeSeriesComplete marks a machine as having completed a managed series upgrade.

func (*MachineManagerAPI) UpgradeSeriesPrepare

func (mm *MachineManagerAPI) UpgradeSeriesPrepare(args params.UpdateSeriesArg) (params.ErrorResult, error)

UpgradeSeriesPrepare prepares a machine for a OS series upgrade.

func (*MachineManagerAPI) UpgradeSeriesValidate

func (mm *MachineManagerAPI) UpgradeSeriesValidate(
	args params.UpdateSeriesArgs,
) (params.UpgradeSeriesUnitsResults, error)

UpgradeSeriesValidate validates that the incoming arguments correspond to a valid series upgrade for the target machine. If they do, a list of the machine's current units is returned for use in soliciting user confirmation of the command.

func (*MachineManagerAPI) WatchUpgradeSeriesNotifications

func (mm *MachineManagerAPI) WatchUpgradeSeriesNotifications(args params.Entities) (params.NotifyWatchResults, error)

WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade series events.

type MachineManagerAPIV4

type MachineManagerAPIV4 struct {
	*MachineManagerAPIV5
}

Version 4 of MachineManagerAPI

func NewFacadeV4

func NewFacadeV4(ctx facade.Context) (*MachineManagerAPIV4, error)

NewFacadeV4 creates a new server-side MachineManager API facade.

func (*MachineManagerAPIV4) UpdateMachineSeries

func (mm *MachineManagerAPIV4) UpdateMachineSeries(_ params.UpdateSeriesArgs) (params.ErrorResults, error)

DEPRECATED: UpdateMachineSeries returns an error.

type MachineManagerAPIV5

type MachineManagerAPIV5 struct {
	*MachineManagerAPI
}

Version 5 of Machine Manager API. Adds CreateUpgradeSeriesLock and removes UpdateMachineSeries.

func NewFacadeV5

func NewFacadeV5(ctx facade.Context) (*MachineManagerAPIV5, error)

NewFacadeV5 creates a new server-side MachineManager API facade.

type Model

type Model interface {
	Name() string
	UUID() string
	Cloud() string
	CloudCredential() (names.CloudCredentialTag, bool)
	CloudRegion() string
	Config() (*config.Config, error)
}

type Pool

type Pool interface {
	GetModel(string) (Model, func(), error)
}

type Unit

type Unit interface {
	UnitTag() names.UnitTag
	Name() string
	AgentStatus() (status.StatusInfo, error)
	Status() (status.StatusInfo, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL