Documentation
¶
Index ¶
- type Batch
- type InstanceWithDetails
- type InternalBatch
- func (b *InternalBatch) CanBeModified() bool
- func (b *InternalBatch) CompileIncludeExpression(i InstanceWithDetails) (*vm.Program, error)
- func (b *InternalBatch) GetDatabaseID() (int, error)
- func (b *InternalBatch) GetMigrationWindowEnd() time.Time
- func (b *InternalBatch) GetMigrationWindowStart() time.Time
- func (b *InternalBatch) GetName() string
- func (b *InternalBatch) GetStatus() api.BatchStatusType
- func (b *InternalBatch) GetStoragePool() string
- func (b *InternalBatch) GetTargetID() int
- func (b *InternalBatch) GetTargetProject() string
- func (b *InternalBatch) InstanceMatchesCriteria(i InstanceWithDetails) (bool, error)
- type Overrides
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch interface {
// Returns the name of this batch.
GetName() string
// Returns a unique ID for this batch that can be used when interacting with the database.
//
// Attempting to get an ID for a freshly-created batch that hasn't yet been added to the database
// via AddBatch() or retrieved via GetBatch()/GetAllBatches() will return an error.
GetDatabaseID() (int, error)
// Returns the target ID for this batch, if any.
GetTargetID() int
// Returns the target project for this batch; if not specified returns "default".
GetTargetProject() string
// Returns true if the batch can be modified.
CanBeModified() bool
// Returns true if the instance matches inclusion/exclusion criteria for this batch.
InstanceMatchesCriteria(i InstanceWithDetails) (bool, error)
// Returns the status of this batch.
GetStatus() api.BatchStatusType
// Returns the storage pool for this batch
GetStoragePool() string
// Returns the migration window start time
GetMigrationWindowStart() time.Time
// Returns the migration window end time
GetMigrationWindowEnd() time.Time
}
Interface definition for all migration manager batches.
type InstanceWithDetails ¶
type InstanceWithDetails struct {
Name string
InventoryPath string
Annotation string
GuestToolsVersion int
Architecture string
HardwareVersion string
OS string
OSVersion string
Devices []api.InstanceDeviceInfo
Disks []api.InstanceDiskInfo
NICs []api.InstanceNICInfo
Snapshots []api.InstanceSnapshotInfo
CPU api.InstanceCPUInfo
Memory api.InstanceMemoryInfo
UseLegacyBios bool
SecureBootEnabled bool
TPMPresent bool
Source Source
Overrides api.InstanceOverride
}
type InternalBatch ¶
func NewBatch ¶
func NewBatch(name string, targetID int, targetProject string, storagePool string, includeExpression string, migrationWindowStart time.Time, migrationWindowEnd time.Time) *InternalBatch
Returns a new Batch ready for use.
func (*InternalBatch) CanBeModified ¶
func (b *InternalBatch) CanBeModified() bool
func (*InternalBatch) CompileIncludeExpression ¶
func (b *InternalBatch) CompileIncludeExpression(i InstanceWithDetails) (*vm.Program, error)
func (*InternalBatch) GetDatabaseID ¶
func (b *InternalBatch) GetDatabaseID() (int, error)
func (*InternalBatch) GetMigrationWindowEnd ¶
func (b *InternalBatch) GetMigrationWindowEnd() time.Time
func (*InternalBatch) GetMigrationWindowStart ¶
func (b *InternalBatch) GetMigrationWindowStart() time.Time
func (*InternalBatch) GetName ¶
func (b *InternalBatch) GetName() string
func (*InternalBatch) GetStatus ¶
func (b *InternalBatch) GetStatus() api.BatchStatusType
func (*InternalBatch) GetStoragePool ¶
func (b *InternalBatch) GetStoragePool() string
func (*InternalBatch) GetTargetID ¶
func (b *InternalBatch) GetTargetID() int
func (*InternalBatch) GetTargetProject ¶
func (b *InternalBatch) GetTargetProject() string
func (*InternalBatch) InstanceMatchesCriteria ¶
func (b *InternalBatch) InstanceMatchesCriteria(i InstanceWithDetails) (bool, error)
Click to show internal directories.
Click to hide internal directories.