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

package migrationmaster

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

This package defines the API facade for use by the migration master worker when communicating with its own controller.

Index

Package Files

backend.go doc.go facade.go shim.go

type API Uses

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

API implements the API required for the model migration master worker.

func NewAPI Uses

func NewAPI(
    backend Backend,
    precheckBackend migration.PrecheckBackend,
    pool migration.Pool,
    resources facade.Resources,
    authorizer facade.Authorizer,
    presence facade.Presence,
) (*API, error)

NewAPI creates a new API server endpoint for the model migration master worker.

func NewMigrationMasterFacadeV2 Uses

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

NewMigrationMasterFacadeV2 exists to provide the required signature for API registration, converting st to backend.

func (*API) Export Uses

func (api *API) Export() (params.SerializedModel, error)

Export serializes the model associated with the API connection.

func (*API) MigrationStatus Uses

func (api *API) MigrationStatus() (params.MasterMigrationStatus, error)

MigrationStatus returns the details and progress of the latest model migration.

func (*API) MinionReports Uses

func (api *API) MinionReports() (params.MinionReports, error)

MinionReports returns details of the reports made by migration minions to the controller for the current migration phase.

func (*API) ModelInfo Uses

func (api *API) ModelInfo() (params.MigrationModelInfo, error)

ModelInfo returns essential information about the model to be migrated.

func (*API) Prechecks Uses

func (api *API) Prechecks() error

Prechecks performs pre-migration checks on the model and (source) controller.

func (*API) ProcessRelations Uses

func (api *API) ProcessRelations(args params.ProcessRelations) error

ProcessRelations processes any relations that need updating after an export. This should help fix any remoteApplications that have been migrated.

func (*API) Reap Uses

func (api *API) Reap() error

Reap removes all documents for the model associated with the API connection.

func (*API) SetPhase Uses

func (api *API) SetPhase(args params.SetMigrationPhaseArgs) error

SetPhase sets the phase of the active model migration. The provided phase must be a valid phase value, for example QUIESCE" or "ABORT". See the core/migration package for the complete list.

func (*API) SetStatusMessage Uses

func (api *API) SetStatusMessage(args params.SetMigrationStatusMessageArgs) error

SetStatusMessage sets a human readable status message containing information about the migration's progress. This will be shown in status output shown to the end user.

func (*API) Watch Uses

func (api *API) Watch() params.NotifyWatchResult

Watch starts watching for an active migration for the model associated with the API connection. The returned id should be used with the NotifyWatcher facade to receive events.

func (*API) WatchMinionReports Uses

func (api *API) WatchMinionReports() params.NotifyWatchResult

WatchMinionReports sets up a watcher which reports when a report for a migration minion has arrived.

type APIV1 Uses

type APIV1 struct {
    *API
}

func NewMigrationMasterFacade Uses

func NewMigrationMasterFacade(ctx facade.Context) (*APIV1, error)

NewMigrationMasterFacade exists to provide the required signature for API registration, converting st to backend.

func (*APIV1) ProcessRelations Uses

func (api *APIV1) ProcessRelations(_, _ struct{})

ProcessRelations is masked on older versions of the migration master API

type Backend Uses

type Backend interface {
    migration.StateExporter

    WatchForMigration() state.NotifyWatcher
    LatestMigration() (state.ModelMigration, error)
    ModelUUID() string
    ModelName() (string, error)
    ModelOwner() (names.UserTag, error)
    AgentVersion() (version.Number, error)
    RemoveExportingModelDocs() error
}

Backend defines the state functionality required by the migrationmaster facade.

type OfferConnection Uses

type OfferConnection interface {
    // OfferUUID uniquely identifies the relation offer.
    OfferUUID() string

    // UserName returns the name of the user who created this connection.
    UserName() string

    // RelationId is the id of the relation to which this connection pertains.
    RelationId() int

    // SourceModelUUID is the uuid of the consuming model.
    SourceModelUUID() string

    // RelationKey is the key of the relation to which this connection pertains.
    RelationKey() string
}

OfferConnection describes methods offer connection methods required for migration pre-checks.

Directories

PathSynopsis
mocksPackage mocks is a generated GoMock package.

Package migrationmaster imports 15 packages (graph) and is imported by 4 packages. Updated 2020-01-17. Refresh now. Tools for package owners.