Documentation ¶
Index ¶
- Constants
- func ConfigToAZMapping(c config.Config) ([]converter.AZMapping, error)
- func ConfigToAdditionalVMs(c config.Config) []bosh.VM
- func ConfigToSourceClustersByAZ(c config.Config) map[string][]string
- func ConfigToTargetHostPoolConfig(c config.Config) *vcenter.HostPoolConfig
- func ConfigToVCenterClientPool(c config.Config) *vcenter.Pool
- type BoshClient
- type FoundationMigrator
- type NullBoshClient
- type UpdatableLogger
- type VCenterClient
- type VM
- type VMMigrator
- type VMRelocator
Constants ¶
const DefaultWorkerCount = 3
Variables ¶
This section is empty.
Functions ¶
func ConfigToAZMapping ¶ added in v0.6.0
ConfigToAZMapping creates the expanded source -> target AZ mappings used by the compute mapper
func ConfigToAdditionalVMs ¶ added in v0.6.0
ConfigToAdditionalVMs creates a list of additional non-bosh VMs to migrate
func ConfigToSourceClustersByAZ ¶ added in v0.6.0
ConfigToSourceClustersByAZ creates a map of AZs to their source clusters
func ConfigToTargetHostPoolConfig ¶ added in v0.6.0
func ConfigToTargetHostPoolConfig(c config.Config) *vcenter.HostPoolConfig
ConfigToTargetHostPoolConfig creates the required configuration format to create a target host pool
Types ¶
type BoshClient ¶
func ConfigToBoshClient ¶ added in v0.6.0
func ConfigToBoshClient(c config.Config) BoshClient
ConfigToBoshClient creates an optional bosh client if configured, other a null object (pattern)
type FoundationMigrator ¶
type FoundationMigrator struct { WorkerCount int AdditionalVMs []bosh.VM // contains filtered or unexported fields }
FoundationMigrator orchestrates the entire migration of a foundation
func NewFoundationMigrator ¶
func NewFoundationMigrator( clientPool *vcenter.Pool, boshClient BoshClient, vmMigrator *VMMigrator, srcAZsToClusters map[string][]string, out *log.UpdatableStdout) *FoundationMigrator
NewFoundationMigrator creates a new initialized FoundationMigrator using the provided instances
func NewFoundationMigratorFromConfig ¶ added in v0.6.0
func NewFoundationMigratorFromConfig(c config.Config) (*FoundationMigrator, error)
NewFoundationMigratorFromConfig creates a new FoundationMigrator instance from the specified config
type NullBoshClient ¶ added in v0.5.0
type NullBoshClient struct{}
NullBoshClient is a null object pattern when no bosh client is specified in the config
func (NullBoshClient) VMsAndStemcells ¶ added in v0.5.0
VMsAndStemcells returns an empty list
type UpdatableLogger ¶ added in v0.6.0
type UpdatableLogger interface {
PrintUpdatablef(id, format string, a ...interface{})
}
type VCenterClient ¶
type VMMigrator ¶
type VMMigrator struct {
// contains filtered or unexported fields
}
func NewVMMigrator ¶
func NewVMMigrator(clientPool *vcenter.Pool, sourceVMConverter *converter.Converter, vmRelocator VMRelocator, updatableStdout UpdatableLogger) *VMMigrator
func (*VMMigrator) MigrateVMToTarget ¶ added in v0.6.0
func (m *VMMigrator) MigrateVMToTarget(ctx context.Context, sourceClient VCenterClient, sourceVM VM) error