Documentation
¶
Index ¶
- Constants
- type Artifact
- type ArtifactPost
- type ArtifactProperties
- type ArtifactType
- type Batch
- type BatchConstraint
- type BatchPut
- type BatchStatusType
- type ExternalConnectivityStatus
- type IncusProperties
- type Instance
- type InstanceOverride
- type InstanceProperties
- type InstancePropertiesConfigurable
- type InstancePropertiesDisk
- type InstancePropertiesNIC
- type InstancePropertiesSnapshot
- type InstanceRestrictionOverride
- type MigrationStatusType
- type MigrationWindow
- type Network
- type NetworkOverride
- type NetworkType
- type OSType
- type Placement
- type QueueEntry
- type ServerPut
- type ServerUntrusted
- type Source
- type SourcePut
- type SourceType
- type SystemCertificatePost
- type SystemConfig
- type SystemNetwork
- type SystemSecurity
- type SystemSecurityOIDC
- type SystemSecurityOpenFGA
- type Target
- type TargetPut
- type TargetType
- type VMwareProperties
- type Warning
- type WarningPut
- type WarningScope
- type WarningStatus
- type WarningType
- type WorkerCommand
- type WorkerCommandType
- type WorkerResponse
- type WorkerResponseType
Constants ¶
const ( DefaultTarget = "default" DefaultTargetProject = "default" DefaultStoragePool = "default" )
const ( APIVersion string = "1.0" APIStatus string = "devel" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
ArtifactPost
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Files []string `json:"files" yaml:"files"`
}
func (Artifact) DefaultArtifactFile ¶
DefaultArtifactFile returns the default file name expected for a given artifact parent (OS name or source type).
type ArtifactPost ¶
type ArtifactPost struct {
Type ArtifactType `json:"type" yaml:"type"`
Properties ArtifactProperties `json:"properties" yaml:"properties"`
}
type ArtifactProperties ¶
type ArtifactProperties struct {
// Description of the artifact.
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// OS name that the artifact relates to.
OS OSType `json:"os,omitempty" yaml:"os,omitempty"`
// Architectures used to match VMs to an artifact.
Architectures []string `json:"architectures,omitempty" yaml:"architectures,omitempty"`
// Versions used to match VMs to an artifact.
Versions []string `json:"versions,omitempty" yaml:"versions,omitempty"`
// Source type that the artifact relates to.
SourceType SourceType `json:"source_type,omitempty" yaml:"source_type,omitempty"`
}
type ArtifactType ¶
type ArtifactType string
const ( ARTIFACTTYPE_SDK ArtifactType = "sdk" ARTIFACTTYPE_OSIMAGE ArtifactType = "os-image" ARTIFACTTYPE_DRIVER ArtifactType = "driver" )
type Batch ¶
type Batch struct {
BatchPut
// The status of this batch
// Example: BATCHSTATUS_DEFINED
Status BatchStatusType `json:"status" yaml:"status"`
// A free-form string to provide additional information about the status
// Example: "4 of 5 instances migrated"
StatusMessage string `json:"status_message" yaml:"status_message"`
}
Batch defines a collection of Instances to be migrated, possibly during a specific window of time.
swagger:model
type BatchConstraint ¶
type BatchConstraint struct {
// Name of the constraint.
Name string `json:"name" yaml:"name"`
// Description of the constraint.
Description string `json:"description" yaml:"description"`
// Expression used to select instances for the constraint.
IncludeExpression string `json:"include_expression" yaml:"include_expression"`
// Maximum amount of matched instances that can concurrently migrate, before moving to the next migration window.
MaxConcurrentInstances int `json:"max_concurrent_instances" yaml:"max_concurrent_instances"`
// Minimum amount of time required for an instance to boot after initial disk import. Migration window duration must be at least this much.
MinInstanceBootTime string `json:"min_instance_boot_time" yaml:"min_instance_boot_time"`
}
BatchConstraint is a constraint to be applied to a batch to determine which instances can be migrated.
type BatchPut ¶
type BatchPut struct {
// A human-friendly name for this batch
// Example: MyBatch
Name string `json:"name" yaml:"name"`
// The destination target name to be used by all instances in this batch
// Example: Mytarget
DefaultTarget string `json:"default_target" yaml:"default_target"`
// The target project to use
// Example: default
DefaultTargetProject string `json:"default_target_project" yaml:"default_target_project"`
// The Incus storage pool that this batch should use for creating VMs and mounting ISO images
// Example: local
DefaultStoragePool string `json:"default_storage_pool" yaml:"default_storage_pool"`
// Whether to re-run scriptlets if a migration restarts
RerunScriptlets bool `json:"rerun_scriptlets" yaml:"rerun_scriptlets"`
// The placement scriptlet used to determine the target for queued instances.
// Example: starlark scriptlet
PlacementScriptlet string `json:"placement_scriptlet" yaml:"placement_scriptlet"`
// A Expression used to select instances to add to this batch
// Language reference: https://expr-lang.org/docs/language-definition
// Example: GetInventoryPath() matches "^foobar/.*"
IncludeExpression string `json:"include_expression" yaml:"include_expression"`
// PostMigrationRetries is the maximum number of times post-migration steps will be retried upon errors.
// Example: 5
PostMigrationRetries int `json:"post_migration_retries" yaml:"post_migration_retries"`
// Set of migration window timings.
MigrationWindows []MigrationWindow `json:"migration_windows" yaml:"migration_windows"`
// Set of constraints to apply to the batch.
Constraints []BatchConstraint `json:"constraints" yaml:"constraints"`
// Time in UTC when the batch was started.
StartDate time.Time `json:"start_date" yaml:"start_date"`
// Overrides to allow migrating instances that are otherwise restricted.
RestrictionOverrides InstanceRestrictionOverride `json:"instance_restriction_overrides" yaml:"instance_restriction_overrides"`
}
BatchPut defines the configurable fields of Batch.
swagger:model
type BatchStatusType ¶
type BatchStatusType string
const ( BATCHSTATUS_DEFINED BatchStatusType = "Defined" BATCHSTATUS_RUNNING BatchStatusType = "Running" BATCHSTATUS_STOPPED BatchStatusType = "Stopped" BATCHSTATUS_FINISHED BatchStatusType = "Finished" BATCHSTATUS_ERROR BatchStatusType = "Error" )
func (BatchStatusType) Validate ¶
func (b BatchStatusType) Validate() error
Validate ensures the BatchStatusType is valid.
type ExternalConnectivityStatus ¶
type ExternalConnectivityStatus string
const ( EXTERNALCONNECTIVITYSTATUS_UNKNOWN ExternalConnectivityStatus = "Unknown" EXTERNALCONNECTIVITYSTATUS_OK ExternalConnectivityStatus = "OK" EXTERNALCONNECTIVITYSTATUS_CANNOT_CONNECT ExternalConnectivityStatus = "Cannot connect" EXTERNALCONNECTIVITYSTATUS_TLS_ERROR ExternalConnectivityStatus = "TLS error" EXTERNALCONNECTIVITYSTATUS_TLS_CONFIRM_FINGERPRINT ExternalConnectivityStatus = "Confirm TLS fingerprint" EXTERNALCONNECTIVITYSTATUS_AUTH_ERROR ExternalConnectivityStatus = "Authentication error" EXTERNALCONNECTIVITYSTATUS_WAITING_OIDC ExternalConnectivityStatus = "Waiting for OIDC authentications" )
func MapExternalConnectivityStatusToStatus ¶
func MapExternalConnectivityStatusToStatus(err error) ExternalConnectivityStatus
type IncusProperties ¶
type IncusProperties struct {
// Hostname or IP address of the target endpoint
// Example: https://incus.local:6443
Endpoint string `json:"endpoint" yaml:"endpoint"`
// Store the expected target's TLS certificate, in raw bytes. Useful in situations when TLS certificate validation fails, such as when using self-signed certificates.
ServerCertificate []byte `json:"trusted_server_certificate,omitempty" yaml:"trusted_server_certificate,omitempty"`
// If set and the fingerprint matches that of the ServerCertificate, enables use of that certificate when performing TLS handshake.
// Example: b51b3046a03164a2ca279222744b12fe0878a8c12311c88fad427f4e03eca42d
TrustedServerCertificateFingerprint string `json:"trusted_server_certificate_fingerprint,omitempty" yaml:"trusted_server_certificate_fingerprint,omitempty"`
// base64-encoded TLS client key for authentication
TLSClientKey string `json:"tls_client_key,omitempty" yaml:"tls_client_key,omitempty"`
// base64-encoded TLS client certificate for authentication
TLSClientCert string `json:"tls_client_cert,omitempty" yaml:"tls_client_cert,omitempty"`
// OpenID Connect tokens
OIDCTokens *oidc.Tokens[*oidc.IDTokenClaims] `json:"oidc_tokens,omitempty" yaml:"oidc_tokens,omitempty"`
// Connectivity status of this target
ConnectivityStatus ExternalConnectivityStatus `json:"connectivity_status" yaml:"connectivity_status"`
// Maximum number of concurrent imports that can occur
// Example: 10
ImportLimit int `json:"import_limit,omitempty" yaml:"import_limit,omitempty"`
// Maximum number of concurrent instance creations that can occur
// Example: 10
CreateLimit int `json:"create_limit,omitempty" yaml:"create_limit,omitempty"`
}
IncusProperties defines the set of Incus specific properties of a target that the migration manager can connect to.
swagger:model
type Instance ¶
type Instance struct {
// The originating source name for this instance
// Example: MySource
Source string `json:"source" yaml:"source"`
SourceType SourceType `json:"source_type" yaml:"source_type"`
Properties InstanceProperties `json:"properties" yaml:"properties"`
LastUpdateFromSource time.Time `json:"last_update_from_source" yaml:"last_update_from_source"`
// Overrides, if any, for this instance
// Example: {..., NumberCPUs: 16, ...}
Overrides InstanceOverride `json:"overrides" yaml:"overrides"`
}
Instance defines a VM instance to be migrated.
swagger:model
type InstanceOverride ¶
type InstanceOverride struct {
// The last time this instance override was updated
// Example: 2024-11-12 16:15:00 +0000 UTC
LastUpdate time.Time `json:"last_update" yaml:"last_update"`
// An optional comment about the override
// Example: "Manually tweak number of CPUs"
Comment string `json:"comment" yaml:"comment"`
// If true, migration of this instance will be disabled.
// Example: true
DisableMigration bool `json:"disable_migration" yaml:"disable_migration"`
// If true, restrictions that put the VM in a blocked state, preventing migration, will be ignored.
// Example: true
IgnoreRestrictions bool `json:"ignore_restrictions" yaml:"ignore_restrictions"`
Properties InstancePropertiesConfigurable `json:"properties" yaml:"properties"`
}
InstanceOverride defines a limited set of instance values that can be overridden as part of the migration process.
swagger:model
type InstanceProperties ¶
type InstanceProperties struct {
InstancePropertiesConfigurable
UUID uuid.UUID `json:"uuid" yaml:"uuid" expr:"uuid"`
Name string `json:"name" yaml:"name" expr:"name"`
Location string `json:"location" yaml:"location" expr:"location"`
OS string `json:"os" yaml:"os" expr:"os"`
OSVersion string `json:"os_version" yaml:"os_version" expr:"os_version"`
SecureBoot bool `json:"secure_boot" yaml:"secure_boot" expr:"secure_boot"`
LegacyBoot bool `json:"legacy_boot" yaml:"legacy_boot" expr:"legacy_boot"`
TPM bool `json:"tpm" yaml:"tpm" expr:"tpm"`
Running bool `json:"running" yaml:"running" expr:"running"`
BackgroundImport bool `json:"background_import" yaml:"background_import" expr:"background_import"`
Architecture string `json:"architecture" yaml:"architecture" expr:"architecture"`
NICs []InstancePropertiesNIC `json:"nics" yaml:"nics" expr:"nics"`
Disks []InstancePropertiesDisk `json:"disks" yaml:"disks" expr:"disks"`
Snapshots []InstancePropertiesSnapshot `json:"snapshots" yaml:"snapshots" expr:"snapshots"`
}
InstanceProperties are all properties supported by instances.
func (*InstanceProperties) Apply ¶
func (i *InstanceProperties) Apply(cfg InstancePropertiesConfigurable)
Apply updates the properties with the given set of configurable properties. Only non-default values will be applied.
type InstancePropertiesConfigurable ¶
type InstancePropertiesConfigurable struct {
Description string `json:"description,omitempty" yaml:"description,omitempty" expr:"description"`
CPUs int64 `json:"cpus" yaml:"cpus" expr:"cpus"`
Memory int64 `json:"memory" yaml:"memory" expr:"memory"`
Config map[string]string `json:"config" yaml:"config" expr:"config"`
}
InstancePropertiesConfigurable are the configurable properties of an instance.
type InstancePropertiesDisk ¶
type InstancePropertiesDisk struct {
Capacity int64 `json:"capacity" yaml:"capacity" expr:"capacity"`
Name string `json:"name" yaml:"name" expr:"name"`
Supported bool `json:"supported" yaml:"supported" expr:"supported"`
}
InstancePropertiesDisk are all properties supported by instance disks.
type InstancePropertiesNIC ¶
type InstancePropertiesNIC struct {
ID string `json:"id" yaml:"id" expr:"id"`
HardwareAddress string `json:"hardware_address" yaml:"hardware_address" expr:"hardware_address"`
Network string `json:"network" yaml:"network" expr:"network"`
IPv4Address string `json:"ipv4_address" yaml:"ipv4_address" expr:"ipv4_address"`
IPv6Address string `json:"ipv6_address" yaml:"ipv6_address" expr:"ipv6_address"`
}
InstancePropertiesNIC are all properties supported by instance NICs.
type InstancePropertiesSnapshot ¶
type InstancePropertiesSnapshot struct {
Name string `json:"name" yaml:"name" expr:"name"`
}
InstancePropertiesSnapshot are all properties supported by snapshots.
type MigrationStatusType ¶
type MigrationStatusType string
const ( MIGRATIONSTATUS_WAITING MigrationStatusType = "Waiting" MIGRATIONSTATUS_CREATING MigrationStatusType = "Creating new VM" MIGRATIONSTATUS_BLOCKED MigrationStatusType = "Blocked" MIGRATIONSTATUS_BACKGROUND_IMPORT MigrationStatusType = "Performing background import tasks" MIGRATIONSTATUS_IDLE MigrationStatusType = "Idle" MIGRATIONSTATUS_FINAL_IMPORT MigrationStatusType = "Performing final import tasks" MIGRATIONSTATUS_POST_IMPORT MigrationStatusType = "Performing post-import tasks" MIGRATIONSTATUS_WORKER_DONE MigrationStatusType = "Worker tasks complete" MIGRATIONSTATUS_FINISHED MigrationStatusType = "Finished" MIGRATIONSTATUS_ERROR MigrationStatusType = "Error" )
func (MigrationStatusType) Validate ¶
func (m MigrationStatusType) Validate() error
Validate ensures the MigrationStatusType is valid.
type MigrationWindow ¶
type MigrationWindow struct {
// Start time for finalizing migrations after background import.
Start time.Time `json:"start" yaml:"start"`
// End time for finalizing migrations after background import.
End time.Time `json:"end" yaml:"end"`
// Lockout time after which the batch can no longer modify the target instance.
Lockout time.Time `json:"lockout" yaml:"lockout"`
}
MigrationWindow defines the scheduling of a batch migration.
type Network ¶
type Network struct {
NetworkOverride
// The identifier of the network
// Example: network-23
Identifier string `json:"identifier" yaml:"identifier"`
// vCenter source for the network
// Example: vcenter01
Source string `json:"source" yaml:"source"`
// Type of the network
// Example: standard
Type NetworkType `json:"type" yaml:"type"`
// Full inventory location path of the network
// Example: /vcenter01/network/net0
Location string `json:"location" yaml:"location"`
// Additional properties of the network.
Properties json.RawMessage `json:"properties" yaml:"properties"`
}
Network defines the network config for use by the migration manager.
swagger:model
type NetworkOverride ¶
type NetworkOverride struct {
// Name of the network on the target.
// Example: "vmware"
Name string `json:"name" yaml:"name"`
// Name of the parent bridge to use with a VLAN.
// Example: br0
BridgeName string `json:"bridge_name" yaml:"bridge_name"`
// Name of the VLAN ID to use with a VLAN network.
// Example: 1
VlanID string `json:"vlan_id" yaml:"vlan_id"`
}
NetworkOverride defines the configurable properties of Network.
swagger:model
type NetworkType ¶
type NetworkType string
const ( // NETWORKTYPE_VMWARE_STANDARD is a standard vCenter switch-backed port group. NETWORKTYPE_VMWARE_STANDARD NetworkType = "standard" // NETWORKTYPE_VMWARE_DISTRIBUTED is a distributed port group backed by a vCenter distributed switch. NETWORKTYPE_VMWARE_DISTRIBUTED NetworkType = "distributed" // NETWORKTYPE_VMWARE_DISTRIBUTED_NSX is a distributed port group backed by NSX. NETWORKTYPE_VMWARE_DISTRIBUTED_NSX NetworkType = "nsx-distributed" // NETWORKTYPE_VMWARE_NSX is an opaque network managed by NSX. NETWORKTYPE_VMWARE_NSX NetworkType = "nsx" )
type Placement ¶
type Placement struct {
// Name of the target this queue entry is migrating to
TargetName string `json:"target_name,omitempty" yaml:"target_name,omitempty"`
// Name of the target project this queue entry is migrating to
TargetProject string `json:"target_project,omitempty" yaml:"target_project,omitempty"`
// Storage pools keyed by attached disk name.
StoragePools map[string]string `json:"storage_pools" yaml:"storage_pools"`
// Networks keyed by attached network identifier.
Networks map[string]string `json:"networks" yaml:"networks"`
// VlanIDs keyed by attached network identifier.
VlanIDs map[string]string `json:"vlan_ids" yaml:"vlan_ids"`
}
Placement indicates the destination for a queue entry's instance.
swagger:model
type QueueEntry ¶
type QueueEntry struct {
// UUID for the instance; populated from the source and used across all migration manager operations
// Example: 26fa4eb7-8d4f-4bf8-9a6a-dd95d166dfad
InstanceUUID uuid.UUID `json:"instance_uuid" yaml:"instance_uuid"`
// The name of the instance
// Example: UbuntuServer
InstanceName string `json:"instance_name" yaml:"instance_name"`
// The migration status of the instance
// Example: MIGRATIONSTATUS_RUNNING
MigrationStatus MigrationStatusType `json:"migration_status" yaml:"migration_status"`
// A free-form string to provide additional information about the migration status
// Example: "Migration 25% complete"
MigrationStatusMessage string `json:"migration_status_message" yaml:"migration_status_message"`
// A human-friendly name for the batch
// Example: MyBatch
BatchName string `json:"batch_name" yaml:"batch_name"`
// Time in UTC that the queue entry received a response from the migration worker
LastWorkerResponse time.Time
// The window that this queue entry will perform the final import steps
MigrationWindow MigrationWindow `json:"migration_window" yaml:"migration_window"`
// Configuration for which target the instance will be placed on.
Placement Placement `json:"placement" yaml:"placement"`
}
QueueEntry provides a high-level status for an instance that is in a migration stage.
swagger:model
type ServerPut ¶
type ServerPut struct {
// Server configuration map (refer to doc/server.md)
// Example: {"core.https_address": ":6443"}
Config map[string]string `json:"config" yaml:"config"`
}
ServerPut represents the modifiable fields of a server configuration
swagger:model
type ServerUntrusted ¶
type ServerUntrusted struct {
ServerPut `yaml:",inline"`
// Support status of the current API (one of "devel", "stable" or "deprecated")
// Read only: true
// Example: stable
APIStatus string `json:"api_status" yaml:"api_status"`
// API version number
// Read only: true
// Example: 1.0
APIVersion string `json:"api_version" yaml:"api_version"`
// Whether the client is trusted (one of "trusted" or "untrusted")
// Read only: true
// Example: untrusted
Auth string `json:"auth" yaml:"auth"`
// List of supported authentication methods
// Read only: true
// Example: ["tls"]
//
// API extension: macaroon_authentication
AuthMethods []string `json:"auth_methods" yaml:"auth_methods"`
}
ServerUntrusted represents a server configuration for an untrusted client
swagger:model
type Source ¶
type Source struct {
SourcePut
// SourceType defines the type of the source
SourceType SourceType `json:"source_type" yaml:"source_type"`
}
Source defines properties common to all sources.
swagger:model
type SourcePut ¶
type SourcePut struct {
// A human-friendly name for this source
// Example: MySource
Name string `json:"name" yaml:"name"`
// Properties contains source type specific properties
Properties json.RawMessage `json:"properties" yaml:"properties"`
}
SourcePut defines the configurable properties of Source.
swagger:model
type SourceType ¶
type SourceType string
const ( SOURCETYPE_COMMON SourceType = "common" SOURCETYPE_VMWARE SourceType = "vmware" SOURCETYPE_NSX SourceType = "nsx" )
func NetworkSourceTypes ¶
func NetworkSourceTypes() []SourceType
NetworkSourceTypes are the list of source types that manage networks.
func VMSourceTypes ¶
func VMSourceTypes() []SourceType
VMSourceTypes are the list of source types that manage VMs.
type SystemCertificatePost ¶
type SystemCertificatePost struct {
// The new certificate (X509 PEM encoded) for the system (server certificate).
// Example: X509 PEM certificate
Cert string `json:"certificate" yaml:"certificate"`
// The new certificate key (X509 PEM encoded) for the system (server key).
// Example: X509 PEM certificate key
Key string `json:"key,omitempty" yaml:"key,omitempty"`
// The new certificate CA (X509 PEM encoded) for the system (server CA).
// Example: X509 PEM certificate CA
CA string `json:"ca" yaml:"ca"`
}
SystemCertificatePost represents the fields available for an update of the system certificate (server certificate), key, and CA.
swagger:model
type SystemConfig ¶
type SystemConfig struct {
Network SystemNetwork `json:"network" yaml:"network"`
Security SystemSecurity `json:"security" yaml:"security"`
}
SystemConfig is the full set of system configuration options for Migration Manager.
type SystemNetwork ¶
type SystemNetwork struct {
// Address and port to bind the REST API to.
Address string `json:"rest_server_address" yaml:"rest_server_address"`
// URL used by Migration Manager workers to connect to the Migration Manager daemon.
WorkerEndpoint string `json:"worker_endpoint" yaml:"worker_endpoint"`
}
SystemNetwork represents the system's network configuration.
swagger:model
type SystemSecurity ¶
type SystemSecurity struct {
// An array of SHA256 certificate fingerprints that belong to trusted TLS clients.
TrustedTLSClientCertFingerprints []string `json:"trusted_tls_client_cert_fingerprints" yaml:"trusted_tls_client_cert_fingerprints"`
OIDC SystemSecurityOIDC `json:"oidc" yaml:"oidc"`
OpenFGA SystemSecurityOpenFGA `json:"openfga" yaml:"openfga"`
}
SystemSecurity represents the system's security configuration.
swagger:model
type SystemSecurityOIDC ¶
type SystemSecurityOIDC struct {
// OIDC Issuer.
Issuer string `json:"issuer" yaml:"issuer"`
// Client ID used for communication with the OIDC issuer.
ClientID string `json:"client_id" yaml:"client_id"`
// Scopes to be requested.
Scope string `json:"scopes" yaml:"scopes"`
// Audience the OIDC tokens should be verified against.
Audience string `json:"audience" yaml:"audience"`
// Claim which should be used to identify the user or subject.
Claim string `json:"claim" yaml:"claim"`
}
SystemSecurityOIDC is the OIDC related part of the system's security configuration.
type SystemSecurityOpenFGA ¶
type SystemSecurityOpenFGA struct {
// API token used for communication with the OpenFGA system.
APIToken string `json:"api_token" yaml:"api_token"`
// URL of the OpenFGA API.
APIURL string `json:"api_url" yaml:"api_url"`
// ID of the OpenFGA store.
StoreID string `json:"store_id" yaml:"store_id"`
}
SystemSecurityOpenFGA is the OpenFGA related part of the system's security configuration.
type Target ¶
type Target struct {
TargetPut
// TargetType defines the type of the target
TargetType TargetType `json:"target_type" yaml:"target_type"`
}
Target defines properties common to all targets.
swagger:model
type TargetPut ¶
type TargetPut struct {
// A human-friendly name for this target
// Example: MyTarget
Name string `json:"name" yaml:"name"`
// Properties contains target type specific properties
Properties json.RawMessage `json:"properties" yaml:"properties"`
}
TargetPut defines the configurable properties of Target.
swagger:model
type VMwareProperties ¶
type VMwareProperties struct {
// Hostname or IP address of the source endpoint
// Example: vsphere.local
Endpoint string `json:"endpoint" yaml:"endpoint"`
// Store the expected source's TLS certificate, in raw bytes. Useful in situations when TLS certificate validation fails, such as when using self-signed certificates.
ServerCertificate []byte `json:"trusted_server_certificate,omitempty" yaml:"trusted_server_certificate,omitempty"`
// If set and the fingerprint matches that of the ServerCertificate, enables use of that certificate when performing TLS handshake.
// Example: b51b3046a03164a2ca279222744b12fe0878a8c12311c88fad427f4e03eca42d
TrustedServerCertificateFingerprint string `json:"trusted_server_certificate_fingerprint,omitempty" yaml:"trusted_server_certificate_fingerprint,omitempty"`
// Username to authenticate against the endpoint
// Example: admin
Username string `json:"username" yaml:"username"`
// Password to authenticate against the endpoint
// Example: password
Password string `json:"password" yaml:"password"`
// Connectivity status of this source
ConnectivityStatus ExternalConnectivityStatus `json:"connectivity_status" yaml:"connectivity_status"`
// Maximum number of concurrent imports that can occur
// Example: 10
ImportLimit int `json:"import_limit,omitempty" yaml:"import_limit,omitempty"`
}
VMwareProperties defines the set of VMware specific properties of an endpoint that the migration manager can connect to.
swagger:model
type Warning ¶
type Warning struct {
WarningPut
UUID uuid.UUID `json:"uuid" yaml:"uuid"`
Scope WarningScope `json:"scope" yaml:"scope"`
Type WarningType `json:"type" yaml:"type"`
FirstSeenDate time.Time `json:"first_seen_date" yaml:"first_seen_date"`
LastSeenDate time.Time `json:"last_seen_date" yaml:"last_seen_date"`
UpdatedDate time.Time `json:"updated_date" yaml:"updated_date"`
Messages []string `json:"messages" yaml:"messages"`
Count int `json:"count" yaml:"count"`
}
type WarningPut ¶
type WarningPut struct {
Status WarningStatus `json:"status" yaml:"status"`
}
type WarningScope ¶
type WarningScope struct {
Scope string `json:"scope" yaml:"scope"`
EntityType string `json:"entity_type" yaml:"entity_type"`
Entity string `json:"entity" yaml:"entity"`
}
WarningScope represents a scope for a warning.
func WarningScopeSync ¶
func WarningScopeSync() WarningScope
WarningScopeSync represents a warning scope for syncing a source.
func (WarningScope) Match ¶
func (s WarningScope) Match(w Warning) bool
Match checks whether the given warning is within the given scope.
type WarningStatus ¶
type WarningStatus string
WarningStatus is the acknowledgement status of a warning.
const ( WARNINGSTATUS_NEW WarningStatus = "new" WARNINGSTATUS_ACKNOWLEDGED WarningStatus = "acknowledged" )
type WarningType ¶
type WarningType string
WarningType represents a warning message group.
const ( // NetworkImportFailed indicates a network failed to be imported from its source. NetworkImportFailed WarningType = "Networks not imported" // InstanceImportFailed indicates an instance failed to be imported from its source. InstanceImportFailed WarningType = "Instances not imported" // InstanceMissingNetworkSource indicates an instance contains a network with an external source, but that source is not registered. InstanceMissingNetworkSource WarningType = "External networks with no registered source" SourceUnavailable WarningType = "Sources are unavailable" // InstanceIncomplete indicates an instance was imported with incomplete properties. InstanceIncomplete WarningType = "Instances partially imported" // InstanceCannotMigrate indicates an instance is restricted and cannot be migrated. InstanceCannotMigrate WarningType = "Instance migration is restricted" )
type WorkerCommand ¶
type WorkerCommand struct {
// The command for the worker to execute
// Example: WORKERCOMMAND_IMPORT_DISKS
Command WorkerCommandType `json:"command" yaml:"command"`
// Internal path to the instance
// Example: /SHF/vm/Migration Tests/DebianTest
Location string `json:"location" yaml:"location"`
// SourceType declares the type of the worker and is used as a hint to
// correctly process the details provided in Source.
SourceType SourceType `json:"sourceType" yaml:"sourceType"`
// Source for the worker to fetch VM metadata and/or disk from.
Source json.RawMessage `json:"source" yaml:"source"`
// The name of the operating system
// Example: Ubuntu
OS string `json:"os" yaml:"os"`
// The version of the operating system
// Example: 24.04
OSVersion string `json:"os_version" yaml:"os_version"`
// Operating system type
// Example: linux
OSType OSType `json:"os_type" yaml:"os_type"`
// Architecture of the instance
// Example: x86_64
Architecture string `json:"architecture" yaml:"architecture"`
}
WorkerCommand defines a command sent from the migration manager to a worker.
swagger:model
type WorkerCommandType ¶
type WorkerCommandType int
const ( WORKERCOMMAND_UNKNOWN WorkerCommandType = iota WORKERCOMMAND_IDLE WORKERCOMMAND_IMPORT_DISKS WORKERCOMMAND_FINALIZE_IMPORT WORKERCOMMAND_POST_IMPORT )
type WorkerResponse ¶
type WorkerResponse struct {
// The status of the command the work is/was executing.
// Example: WORKERRESPONSE_RUNNING
Status WorkerResponseType `json:"status" yaml:"status"`
// A free-form string to provide additional information about the command status
// Example: "Migration 25% complete"
StatusMessage string `json:"status_message" yaml:"status_message"`
}
WorkerResponse defines a response received from a worker.
swagger:model
type WorkerResponseType ¶
type WorkerResponseType int
const ( WORKERRESPONSE_UNKNOWN WorkerResponseType = iota WORKERRESPONSE_RUNNING WORKERRESPONSE_SUCCESS WORKERRESPONSE_FAILED )