juju: github.com/juju/juju/apiserver/facades/controller/machineundertaker Index | Files

package machineundertaker

import "github.com/juju/juju/apiserver/facades/controller/machineundertaker"

Index

Package Files

backend.go undertaker.go

type API Uses

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

API implements the API facade used by the machine undertaker.

func NewAPI Uses

func NewAPI(backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*API, error)

NewAPI implements the API used by the machine undertaker worker to find out what provider-level resources need to be cleaned up when a machine goes away.

func NewFacade Uses

func NewFacade(st *state.State, res facade.Resources, auth facade.Authorizer) (*API, error)

NewFacade provides the signature required for facade registration.

func (*API) AllMachineRemovals Uses

func (m *API) AllMachineRemovals(models params.Entities) params.EntitiesResults

AllMachineRemovals returns tags for all of the machines that have been marked for removal in the requested model.

func (*API) CompleteMachineRemovals Uses

func (m *API) CompleteMachineRemovals(machines params.Entities) error

CompleteMachineRemovals removes the specified machines from the model database. It should only be called once any provider-level cleanup has been done for those machines.

func (*API) GetMachineProviderInterfaceInfo Uses

func (m *API) GetMachineProviderInterfaceInfo(machines params.Entities) params.ProviderInterfaceInfoResults

GetMachineProviderInterfaceInfo returns the provider details for all network interfaces attached to the machines requested.

func (*API) WatchMachineRemovals Uses

func (m *API) WatchMachineRemovals(models params.Entities) params.NotifyWatchResults

WatchMachineRemovals returns a watcher that will signal each time a machine is marked for removal.

type Backend Uses

type Backend interface {
    // AllRemovedMachines returns all of the machines which have been
    // marked for removal.
    AllMachineRemovals() ([]string, error)

    // CompleteMachineRemovals removes the machines (and the associated removal
    // requests) after the provider-level cleanup is done.
    CompleteMachineRemovals(machineIDs ...string) error

    // WatchMachineRemovals returns a NotifyWatcher that triggers
    // whenever machine removal requests are added or removed.
    WatchMachineRemovals() state.NotifyWatcher

    // Machine gets a specific machine, so we can collect details of
    // its network interfaces.
    Machine(id string) (Machine, error)
}

Backend defines the methods the machine undertaker needs from state.State.

type Machine Uses

type Machine interface {
    // AllProviderInterfaceInfos returns the details needed to talk to
    // the provider about this machine's attached devices.
    AllProviderInterfaceInfos() ([]network.ProviderInterfaceInfo, error)
}

Machine defines the methods we need from state.Machine.

Package machineundertaker imports 9 packages (graph) and is imported by 3 packages. Updated 2019-09-12. Refresh now. Tools for package owners.