Documentation ¶
Index ¶
- type Backend
- type Machine
- type MachineManagerAPI
- func (mm *MachineManagerAPI) AddMachines(args params.AddMachines) (params.AddMachinesResults, error)
- func (mm *MachineManagerAPI) DestroyMachine(args params.Entities) (params.DestroyMachineResults, error)
- func (mm *MachineManagerAPI) DestroyMachineWithParams(args params.DestroyMachinesParams) (params.DestroyMachineResults, error)
- func (mm *MachineManagerAPI) ForceDestroyMachine(args params.Entities) (params.DestroyMachineResults, error)
- func (mm *MachineManagerAPI) GetUpgradeSeriesMessages(args params.UpgradeSeriesNotificationParams) (params.StringsResults, error)
- func (mm *MachineManagerAPI) InstanceTypes(cons params.ModelInstanceTypesConstraints) (params.InstanceTypesResults, error)
- func (mm *MachineManagerAPI) UpgradeSeriesComplete(args params.UpdateSeriesArg) (params.ErrorResult, error)
- func (mm *MachineManagerAPI) UpgradeSeriesPrepare(args params.UpdateSeriesArg) (params.ErrorResult, error)
- func (mm *MachineManagerAPI) UpgradeSeriesValidate(args params.UpdateSeriesArgs) (params.UpgradeSeriesUnitsResults, error)
- func (mm *MachineManagerAPI) WatchUpgradeSeriesNotifications(args params.Entities) (params.NotifyWatchResults, error)
- type MachineManagerAPIV4
- type MachineManagerAPIV5
- type Model
- type Pool
- type Unit
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 ¶
func (mm *MachineManagerAPI) AddMachines(args params.AddMachines) (params.AddMachinesResults, error)
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 ¶
func (mm *MachineManagerAPI) GetUpgradeSeriesMessages(args params.UpgradeSeriesNotificationParams) (params.StringsResults, error)
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 ¶
func (mm *MachineManagerAPI) InstanceTypes(cons params.ModelInstanceTypesConstraints) (params.InstanceTypesResults, error)
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 Unit ¶
type Unit interface { UnitTag() names.UnitTag Name() string AgentStatus() (status.StatusInfo, error) Status() (status.StatusInfo, error) }