juju: github.com/juju/juju/apiserver/facades/client/machinemanager Index | Files

package machinemanager

import "github.com/juju/juju/apiserver/facades/client/machinemanager"


Package Files

instance_information.go machinemanager.go state.go

type Backend Uses

type Backend interface {

    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 Uses

type Machine interface {
    Destroy() error
    ForceDestroy(time.Duration) 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 Uses

type MachineManagerAPI struct {
    // contains filtered or unexported fields

MachineManagerAPI provides access to the MachineManager API facade.

func NewFacade Uses

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

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

func NewMachineManagerAPI Uses

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 Uses

func (mm *MachineManagerAPI) AddMachines(args params.AddMachines) (params.AddMachinesResults, error)

AddMachines adds new machines with the supplied parameters.

func (*MachineManagerAPI) DestroyMachine Uses

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

DestroyMachine removes a set of machines from the model.

func (*MachineManagerAPI) DestroyMachineWithParams Uses

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

DestroyMachineWithParams removes a set of machines from the model.

func (*MachineManagerAPI) ForceDestroyMachine Uses

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

ForceDestroyMachine forcibly removes a set of machines from the model. TODO (anastasiamac 2019-4-24) From Juju 3.0 this call will be removed in favour of DestroyMachinesWithParams. Also from ModelManger v6 this call is less useful as it does not support MaxWait customisation.

func (*MachineManagerAPI) GetUpgradeSeriesMessages Uses

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 Uses

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 Uses

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

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

func (*MachineManagerAPI) UpgradeSeriesPrepare Uses

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

UpgradeSeriesPrepare prepares a machine for a OS series upgrade.

func (*MachineManagerAPI) UpgradeSeriesValidate Uses

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 Uses

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

WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade series events.

type MachineManagerAPIV4 Uses

type MachineManagerAPIV4 struct {

Version 4 of MachineManagerAPI

func NewFacadeV4 Uses

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

NewFacadeV4 creates a new server-side MachineManager API facade.

func (*MachineManagerAPIV4) UpdateMachineSeries Uses

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

DEPRECATED: UpdateMachineSeries returns an error.

type MachineManagerAPIV5 Uses

type MachineManagerAPIV5 struct {

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

func NewFacadeV5 Uses

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

NewFacadeV5 creates a new server-side MachineManager API facade.

func (*MachineManagerAPIV5) DestroyMachineWithParams Uses

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

DestroyMachineWithParams removes a set of machines from the model. v5 and prior versions did not support MaxWait.

type MachineManagerAPIV6 Uses

type MachineManagerAPIV6 struct {

Version 6 of Machine Manager API. Changes input parameters to DestroyMachineWithParams and ForceDestroyMachine.

func NewFacadeV6 Uses

func NewFacadeV6(ctx facade.Context) (*MachineManagerAPIV6, error)

NewFacadeV6 creates a new server-side MachineManager API facade.

type Model Uses

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

type Pool Uses

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

type Unit Uses

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

Package machinemanager imports 21 packages (graph) and is imported by 4 packages. Updated 2020-01-16. Refresh now. Tools for package owners.