Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExport ¶
func RegisterExport(coordinator Coordinator, clock clock.Clock, logger logger.Logger)
RegisterExport registers the export operations with the given coordinator.
func RegisterImport ¶
func RegisterImport(coordinator Coordinator, clock clock.Clock, logger logger.Logger)
RegisterImport register's a new model migration importer into the supplied coordinator.
Types ¶
type Coordinator ¶
type Coordinator interface {
Add(modelmigration.Operation)
}
Coordinator is the interface that is used to add operations to a migration.
type ExportService ¶
type ExportService interface { // AllMachineNames returns the names of all machines in the model. AllMachineNames(ctx context.Context) ([]coremachine.Name, error) // InstanceID returns the cloud specific instance id for this machine. // If the machine is not provisioned, it returns a NotProvisionedError. InstanceID(ctx context.Context, machineUUID string) (instance.Id, error) // HardwareCharacteristics returns the hardware characteristics of the // specified machine. HardwareCharacteristics(ctx context.Context, machineUUID string) (*instance.HardwareCharacteristics, error) // GetMachineUUID returns the UUID of a machine identified by its name. // It returns a [github.com/juju/juju/domain/machine/errors.MachineNotFound] // if the machine does not exist. GetMachineUUID(ctx context.Context, name coremachine.Name) (string, error) }
ExportService defines the machine service used to export machines to another controller model to this controller.
type ImportService ¶
type ImportService interface { // CreateMachine creates the specified machine. CreateMachine(ctx context.Context, machineName machine.Name) (string, error) // SetMachineCloudInstance sets an entry in the machine cloud instance table // along with the instance tags and the link to a lxd profile if any. SetMachineCloudInstance(ctx context.Context, machineUUID string, instanceID instance.Id, displayName string, hardwareCharacteristics *instance.HardwareCharacteristics) error }
ImportService defines the machine service used to import machines from another controller model to this controller.
Click to show internal directories.
Click to hide internal directories.