2025-09-23 14:34:24 +03:00
|
|
|
package disks
|
|
|
|
|
|
|
|
|
|
// Main information about IO tune
|
|
|
|
|
type IOTune struct {
|
|
|
|
|
// ReadBytesSec
|
|
|
|
|
ReadBytesSec uint64 `json:"read_bytes_sec"`
|
|
|
|
|
|
|
|
|
|
// ReadBytesSecMax
|
|
|
|
|
ReadBytesSecMax uint64 `json:"read_bytes_sec_max"`
|
|
|
|
|
|
|
|
|
|
// ReadIOPSSec
|
|
|
|
|
ReadIOPSSec uint64 `json:"read_iops_sec"`
|
|
|
|
|
|
|
|
|
|
// ReadIOPSSecMax
|
|
|
|
|
ReadIOPSSecMax uint64 `json:"read_iops_sec_max"`
|
|
|
|
|
|
|
|
|
|
// SizeIOPSSec
|
|
|
|
|
SizeIOPSSec uint64 `json:"size_iops_sec"`
|
|
|
|
|
|
|
|
|
|
// TotalBytesSec
|
|
|
|
|
TotalBytesSec uint64 `json:"total_bytes_sec"`
|
|
|
|
|
|
|
|
|
|
// TotalBytesSecMax
|
|
|
|
|
TotalBytesSecMax uint64 `json:"total_bytes_sec_max"`
|
|
|
|
|
|
|
|
|
|
// TotalIOPSSec
|
|
|
|
|
TotalIOPSSec uint64 `json:"total_iops_sec"`
|
|
|
|
|
|
|
|
|
|
// TotalIOPSSecMax
|
|
|
|
|
TotalIOPSSecMax uint64 `json:"total_iops_sec_max"`
|
|
|
|
|
|
|
|
|
|
// WriteBytesSec
|
|
|
|
|
WriteBytesSec uint64 `json:"write_bytes_sec"`
|
|
|
|
|
|
|
|
|
|
// WriteBytesSecMax
|
|
|
|
|
WriteBytesSecMax uint64 `json:"write_bytes_sec_max"`
|
|
|
|
|
|
|
|
|
|
// WriteIOPSSec
|
|
|
|
|
WriteIOPSSec uint64 `json:"write_iops_sec"`
|
|
|
|
|
|
|
|
|
|
// WriteIOPSSecMax
|
|
|
|
|
WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
|
2026-11-20 17:14:41 +03:00
|
|
|
|
|
|
|
|
// ReadBytesSecMaxLength
|
|
|
|
|
ReadBytesSecMaxLength uint64 `json:"read_bytes_sec_max_length"`
|
|
|
|
|
|
|
|
|
|
// ReadIOPSSecMaxLength
|
|
|
|
|
ReadIOPSSecMaxLength uint64 `json:"read_iops_sec_max_length"`
|
|
|
|
|
|
|
|
|
|
// TotalBytesSecMaxLength
|
|
|
|
|
TotalBytesSecMaxLength uint64 `json:"total_bytes_sec_max_length"`
|
|
|
|
|
|
|
|
|
|
// TotalIOPSSecMaxLength
|
|
|
|
|
TotalIOPSSecMaxLength uint64 `json:"total_iops_sec_max_length"`
|
|
|
|
|
|
|
|
|
|
// WriteBytesSecMaxLength
|
|
|
|
|
WriteBytesSecMaxLength uint64 `json:"write_bytes_sec_max_length"`
|
|
|
|
|
|
|
|
|
|
// WriteIOPSSecMaxLength
|
|
|
|
|
WriteIOPSSecMaxLength uint64 `json:"write_iops_sec_max_length"`
|
2025-09-23 14:34:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Main information about disks
|
|
|
|
|
type InfoDisk struct {
|
|
|
|
|
// Account ID
|
|
|
|
|
AccountID uint64 `json:"accountId"`
|
|
|
|
|
|
|
|
|
|
// Account name
|
|
|
|
|
AccountName string `json:"accountName"`
|
|
|
|
|
|
|
|
|
|
// Access Control Control
|
|
|
|
|
ACL map[string]interface{} `json:"acl"`
|
|
|
|
|
|
2026-06-05 17:30:36 +03:00
|
|
|
// Discard
|
|
|
|
|
Discard string `json:"discard"`
|
2026-02-06 17:20:56 +03:00
|
|
|
|
2026-02-20 17:30:02 +03:00
|
|
|
// Block size of disk
|
|
|
|
|
BlockSize string `json:"block_size"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Boot partition
|
|
|
|
|
BootPartition uint64 `json:"bootPartition"`
|
|
|
|
|
|
|
|
|
|
// Computes
|
|
|
|
|
Computes map[string]string `json:"computes"`
|
|
|
|
|
|
2026-06-05 17:30:36 +03:00
|
|
|
// Computes read only
|
|
|
|
|
ComputesReadOnly map[string]bool `json:"computes_read_only"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Created time
|
|
|
|
|
CreatedTime uint64 `json:"createdTime"`
|
|
|
|
|
|
|
|
|
|
// Deleted time
|
|
|
|
|
DeletedTime uint64 `json:"deletedTime"`
|
|
|
|
|
|
|
|
|
|
// Description
|
|
|
|
|
Description string `json:"desc"`
|
|
|
|
|
|
|
|
|
|
// Destruction time
|
|
|
|
|
DestructionTime uint64 `json:"destructionTime"`
|
|
|
|
|
|
|
|
|
|
// Disk path
|
|
|
|
|
DiskPath string `json:"diskPath"`
|
|
|
|
|
|
|
|
|
|
// Grid ID
|
|
|
|
|
GID uint64 `json:"gid"`
|
|
|
|
|
|
|
|
|
|
// GUID
|
|
|
|
|
GUID uint64 `json:"guid"`
|
|
|
|
|
|
|
|
|
|
// ID
|
|
|
|
|
ID uint64 `json:"id"`
|
|
|
|
|
|
|
|
|
|
// Image ID
|
|
|
|
|
ImageID uint64 `json:"imageId"`
|
|
|
|
|
|
|
|
|
|
// List of image IDs
|
|
|
|
|
Images []uint64 `json:"images"`
|
|
|
|
|
|
|
|
|
|
// IOTune
|
|
|
|
|
IOTune IOTune `json:"iotune"`
|
|
|
|
|
|
|
|
|
|
// IQN
|
|
|
|
|
IQN string `json:"iqn"`
|
|
|
|
|
|
|
|
|
|
// Login
|
|
|
|
|
Login string `json:"login"`
|
|
|
|
|
|
|
|
|
|
// Milestones
|
|
|
|
|
Milestones uint64 `json:"milestones"`
|
|
|
|
|
|
|
|
|
|
// Name
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
|
|
|
|
|
// Order
|
|
|
|
|
Order uint64 `json:"order"`
|
|
|
|
|
|
|
|
|
|
// Params
|
|
|
|
|
Params string `json:"params"`
|
|
|
|
|
|
|
|
|
|
// Parent ID
|
|
|
|
|
ParentID uint64 `json:"parentId"`
|
|
|
|
|
|
|
|
|
|
// Password
|
|
|
|
|
Password string `json:"passwd"`
|
|
|
|
|
|
|
|
|
|
// PCI slot
|
|
|
|
|
PCISlot int64 `json:"pciSlot"`
|
|
|
|
|
|
|
|
|
|
// Pool
|
|
|
|
|
Pool string `json:"pool"`
|
|
|
|
|
|
|
|
|
|
// Present to
|
2025-09-26 19:17:30 +03:00
|
|
|
PresentTo map[string]uint64 `json:"presentTo"`
|
2025-09-23 14:34:24 +03:00
|
|
|
|
2026-03-13 17:20:54 +03:00
|
|
|
// Provision
|
|
|
|
|
Provision string `json:"provision"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Purge attempts
|
|
|
|
|
PurgeAttempts uint64 `json:"purgeAttempts"`
|
|
|
|
|
|
|
|
|
|
// Purge time
|
|
|
|
|
PurgeTime uint64 `json:"purgeTime"`
|
|
|
|
|
|
|
|
|
|
// Reality device number
|
|
|
|
|
RealityDeviceNumber uint64 `json:"realityDeviceNumber"`
|
|
|
|
|
|
|
|
|
|
// Reference ID
|
|
|
|
|
ReferenceID string `json:"referenceId"`
|
|
|
|
|
|
|
|
|
|
// Replication
|
|
|
|
|
Replication ItemReplication `json:"replication"`
|
|
|
|
|
|
|
|
|
|
// Resource ID
|
|
|
|
|
ResID string `json:"resId"`
|
|
|
|
|
|
|
|
|
|
// Resource name
|
|
|
|
|
ResName string `json:"resName"`
|
|
|
|
|
|
|
|
|
|
// Role
|
|
|
|
|
Role string `json:"role"`
|
|
|
|
|
|
|
|
|
|
// SEP ID
|
|
|
|
|
SEPID uint64 `json:"sepId"`
|
|
|
|
|
|
|
|
|
|
// Shareable
|
|
|
|
|
Shareable bool `json:"shareable"`
|
|
|
|
|
|
2025-09-26 19:17:30 +03:00
|
|
|
// Size available
|
|
|
|
|
SizeAvailable float64 `json:"sizeAvailable"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Size max
|
|
|
|
|
SizeMax int64 `json:"sizeMax"`
|
|
|
|
|
|
|
|
|
|
// Size used
|
|
|
|
|
SizeUsed float64 `json:"sizeUsed"`
|
|
|
|
|
|
|
|
|
|
// List snapshots
|
|
|
|
|
Snapshots ListSnapshots `json:"snapshots"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
2025-09-27 01:06:15 +03:00
|
|
|
// Storage policy ID
|
|
|
|
|
StoragePolicyID uint64 `json:"storage_policy_id"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Tech status
|
|
|
|
|
TechStatus string `json:"techStatus"`
|
|
|
|
|
|
2025-09-27 01:06:15 +03:00
|
|
|
// Need to clean before destroy
|
|
|
|
|
ToClean bool `json:"to_clean"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Virtual machine ID
|
|
|
|
|
VMID uint64 `json:"vmid"`
|
2025-09-26 19:17:30 +03:00
|
|
|
|
|
|
|
|
// Updated by
|
|
|
|
|
UpdatedBy string `json:"updatedBy"`
|
2026-01-16 17:05:59 +03:00
|
|
|
|
|
|
|
|
// Cache mode of disk
|
|
|
|
|
Cache string `json:"cache"`
|
2026-10-09 16:28:36 +03:00
|
|
|
|
|
|
|
|
// Whether CRT is tracked
|
|
|
|
|
CRTTracking bool `json:"crt_tracking"`
|
2025-09-23 14:34:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ItemReplication struct {
|
2026-10-30 16:04:15 +03:00
|
|
|
// Bandwidth
|
|
|
|
|
Bandwidth uint64 `json:"bandwidth"`
|
|
|
|
|
|
|
|
|
|
// CopyRate
|
|
|
|
|
CopyRate uint64 `json:"copy_rate"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// DiskID
|
|
|
|
|
DiskID uint64 `json:"diskId"`
|
|
|
|
|
|
2026-10-30 16:04:15 +03:00
|
|
|
// LastSync
|
|
|
|
|
LastSync uint64 `json:"last_sync"`
|
|
|
|
|
|
|
|
|
|
// PairID
|
|
|
|
|
PairID string `json:"pair_id"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// PoolID
|
|
|
|
|
PoolID string `json:"poolId"`
|
|
|
|
|
|
2026-10-30 16:04:15 +03:00
|
|
|
// ProfileID
|
|
|
|
|
ProfileID uint64 `json:"profile_id"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Role
|
|
|
|
|
Role string `json:"role"`
|
|
|
|
|
|
2026-10-30 16:04:15 +03:00
|
|
|
// ScheduleID
|
|
|
|
|
ScheduleID uint64 `json:"schedule_id"`
|
|
|
|
|
|
|
|
|
|
// ScheduleName
|
|
|
|
|
ScheduleName string `json:"schedule_name"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// SelfVolumeID
|
|
|
|
|
SelfVolumeID string `json:"selfVolumeId"`
|
|
|
|
|
|
2026-10-30 16:04:15 +03:00
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// StorageID
|
|
|
|
|
StorageID string `json:"storageId"`
|
|
|
|
|
|
2026-10-30 16:04:15 +03:00
|
|
|
// Target
|
|
|
|
|
Target string `json:"target"`
|
|
|
|
|
|
|
|
|
|
// Type
|
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// VolumeID
|
|
|
|
|
VolumeID string `json:"volumeId"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Detailed indormation about disk
|
|
|
|
|
type RecordDisk struct {
|
2025-09-26 19:17:30 +03:00
|
|
|
|
2026-02-20 17:30:02 +03:00
|
|
|
// Block size of disk
|
|
|
|
|
BlockSize string `json:"block_size"`
|
|
|
|
|
|
2025-09-26 19:17:30 +03:00
|
|
|
//Created by
|
|
|
|
|
CreatedBy string `json:"createdBy"`
|
|
|
|
|
|
|
|
|
|
//Deleted by
|
|
|
|
|
DeletedBy string `json:"deletedBy"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Device name
|
|
|
|
|
DeviceName string `json:"devicename"`
|
|
|
|
|
|
|
|
|
|
// SEP type
|
|
|
|
|
SEPType string `json:"sepType"`
|
|
|
|
|
|
|
|
|
|
// Machine ID
|
|
|
|
|
MachineID uint64 `json:"machineId"`
|
|
|
|
|
|
|
|
|
|
// Machine name
|
|
|
|
|
MachineName string `json:"machineName"`
|
|
|
|
|
|
2025-09-26 19:17:30 +03:00
|
|
|
// Main information about disk
|
|
|
|
|
InfoDisk
|
|
|
|
|
|
2026-03-06 16:37:54 +03:00
|
|
|
// Independent
|
|
|
|
|
Independent bool `json:"independent"`
|
|
|
|
|
|
2025-09-26 19:17:30 +03:00
|
|
|
//Updated by
|
|
|
|
|
UpdatedBy string `json:"updatedBy"`
|
|
|
|
|
|
|
|
|
|
// Update time
|
|
|
|
|
UpdatedTime uint64 `json:"updatedTime"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Main information for list disks
|
|
|
|
|
type ItemDisk struct {
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Detailed information about disk
|
|
|
|
|
RecordDisk
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// List disks
|
|
|
|
|
type ListDisks struct {
|
|
|
|
|
// Data
|
|
|
|
|
Data []ItemDisk `json:"data"`
|
|
|
|
|
|
|
|
|
|
// Entry count
|
|
|
|
|
EntryCount uint64 `json:"entryCount"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ListSearchDisks
|
|
|
|
|
type SearchListDisks []ItemDisk
|
|
|
|
|
|
|
|
|
|
// Main information about unattached disk
|
|
|
|
|
type ItemUnattachedDisk struct {
|
|
|
|
|
// Meta
|
|
|
|
|
Meta []interface{} `json:"_meta"`
|
|
|
|
|
|
|
|
|
|
// Main information about disk
|
|
|
|
|
InfoDisk
|
|
|
|
|
|
|
|
|
|
// Updated by
|
|
|
|
|
UpdatedBy uint64 `json:"updatedBy"`
|
|
|
|
|
|
|
|
|
|
// Updated time
|
|
|
|
|
UpdatedTime uint64 `json:"updatedTime"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// List unattached disks
|
|
|
|
|
type ListUnattachedDisks struct {
|
|
|
|
|
// Data
|
|
|
|
|
Data []ItemUnattachedDisk `json:"data"`
|
|
|
|
|
|
|
|
|
|
// Entry count
|
|
|
|
|
EntryCount uint64 `json:"entryCount"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Main information about snapshot
|
|
|
|
|
type ItemSnapshot struct {
|
|
|
|
|
// GUID
|
|
|
|
|
GUID string `json:"guid"`
|
|
|
|
|
|
|
|
|
|
// Label
|
|
|
|
|
Label string `json:"label"`
|
|
|
|
|
|
2026-07-02 14:30:23 +03:00
|
|
|
// Pool name
|
|
|
|
|
PoolName string `json:"poolName"`
|
|
|
|
|
|
2025-09-23 14:34:24 +03:00
|
|
|
// Reference ID
|
|
|
|
|
ReferenceID string `json:"referenceId"`
|
|
|
|
|
|
|
|
|
|
// Resource ID
|
|
|
|
|
ResID string `json:"resId"`
|
|
|
|
|
|
|
|
|
|
// SnapSet GUID
|
|
|
|
|
SnapSetGUID string `json:"snapSetGuid"`
|
|
|
|
|
|
|
|
|
|
// SnapSet time
|
|
|
|
|
SnapSetTime uint64 `json:"snapSetTime"`
|
|
|
|
|
|
|
|
|
|
// Timestamp
|
|
|
|
|
Timestamp uint64 `json:"timestamp"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// List snapshots
|
|
|
|
|
type ListSnapshots []ItemSnapshot
|
|
|
|
|
|
2025-09-27 01:06:15 +03:00
|
|
|
type MigrateStatus struct {
|
|
|
|
|
// Type
|
|
|
|
|
Type int `json:"type"`
|
|
|
|
|
|
|
|
|
|
// Copy speed
|
|
|
|
|
Bandwidth int `json:"bandwidth"`
|
|
|
|
|
|
|
|
|
|
// Current progress
|
|
|
|
|
Cur interface{} `json:"cur"`
|
|
|
|
|
|
|
|
|
|
// Total size
|
|
|
|
|
End interface{} `json:"end"`
|
|
|
|
|
|
|
|
|
|
// Progress percent
|
|
|
|
|
ProgressPercent int `json:"progress_percent"`
|
2026-06-26 16:56:08 +04:00
|
|
|
|
|
|
|
|
// Operation status
|
|
|
|
|
Ready bool `json:"ready"`
|
2025-09-27 01:06:15 +03:00
|
|
|
}
|
2026-10-30 16:04:15 +03:00
|
|
|
|
|
|
|
|
// MigrateV2SourceDisk describes a source disk of a migration
|
|
|
|
|
type MigrateV2SourceDisk struct {
|
|
|
|
|
// Disk ID
|
|
|
|
|
DiskID uint64 `json:"disk_id"`
|
|
|
|
|
|
|
|
|
|
// SEP ID
|
|
|
|
|
SEPID uint64 `json:"sep_id"`
|
|
|
|
|
|
|
|
|
|
// SEP type
|
|
|
|
|
SEPType string `json:"sep_type"`
|
|
|
|
|
|
|
|
|
|
// Pool name
|
|
|
|
|
PoolName string `json:"pool_name"`
|
|
|
|
|
|
|
|
|
|
// Storage policy ID
|
|
|
|
|
StoragePolicyID uint64 `json:"storage_policy_id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2RequestedTarget describes a requested target of a migration
|
|
|
|
|
type MigrateV2RequestedTarget struct {
|
|
|
|
|
// Disk IDs
|
|
|
|
|
DiskIDs []uint64 `json:"disk_ids"`
|
|
|
|
|
|
|
|
|
|
// SEP ID
|
|
|
|
|
SEPID uint64 `json:"sep_id"`
|
|
|
|
|
|
|
|
|
|
// SEP type
|
|
|
|
|
SEPType string `json:"sep_type"`
|
|
|
|
|
|
|
|
|
|
// Pool name
|
|
|
|
|
PoolName string `json:"pool_name"`
|
|
|
|
|
|
|
|
|
|
// Storage policy ID
|
|
|
|
|
StoragePolicyID uint64 `json:"storage_policy_id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2RequestedStorage describes a requested storage of a migration
|
|
|
|
|
type MigrateV2RequestedStorage struct {
|
|
|
|
|
// Targets
|
|
|
|
|
Targets []MigrateV2RequestedTarget `json:"targets"`
|
|
|
|
|
|
|
|
|
|
// Auto cleanup
|
|
|
|
|
AutoCleanup bool `json:"auto_cleanup"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Origin describes an origin of a migration
|
|
|
|
|
type MigrateV2Origin struct {
|
|
|
|
|
// Type
|
|
|
|
|
Type string `json:"type"`
|
|
|
|
|
|
|
|
|
|
// Correlation ID
|
|
|
|
|
CorrelationID string `json:"correlation_id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Observation describes an observation of a migration progress
|
|
|
|
|
type MigrateV2Observation struct {
|
|
|
|
|
// Updated at
|
|
|
|
|
UpdatedAt float64 `json:"updated_at"`
|
|
|
|
|
|
|
|
|
|
// Agent job ID
|
|
|
|
|
AgentJobID string `json:"agent_job_id"`
|
|
|
|
|
|
|
|
|
|
// Attempt
|
|
|
|
|
Attempt uint64 `json:"attempt"`
|
|
|
|
|
|
|
|
|
|
// Operation
|
|
|
|
|
Operation string `json:"operation"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Memory describes a memory progress of a migration
|
|
|
|
|
type MigrateV2Memory struct {
|
|
|
|
|
// Sampled at
|
|
|
|
|
SampledAt float64 `json:"sampled_at"`
|
|
|
|
|
|
|
|
|
|
// Percent
|
|
|
|
|
Percent float64 `json:"percent"`
|
|
|
|
|
|
|
|
|
|
// Bytes per second
|
|
|
|
|
BytesPerSecond float64 `json:"bytes_per_second"`
|
|
|
|
|
|
|
|
|
|
// Processed bytes
|
|
|
|
|
ProcessedBytes uint64 `json:"processed_bytes"`
|
|
|
|
|
|
|
|
|
|
// Remaining bytes
|
|
|
|
|
RemainingBytes uint64 `json:"remaining_bytes"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2ProgressItem describes a progress of a disk copy
|
|
|
|
|
type MigrateV2ProgressItem struct {
|
|
|
|
|
// Kind
|
|
|
|
|
Kind string `json:"kind"`
|
|
|
|
|
|
|
|
|
|
// Source disk ID
|
|
|
|
|
SourceDiskID uint64 `json:"source_disk_id"`
|
|
|
|
|
|
|
|
|
|
// Target disk ID
|
|
|
|
|
TargetDiskID uint64 `json:"target_disk_id"`
|
|
|
|
|
|
|
|
|
|
// Target dev
|
|
|
|
|
TargetDev string `json:"target_dev"`
|
|
|
|
|
|
|
|
|
|
// State
|
|
|
|
|
State string `json:"state"`
|
|
|
|
|
|
|
|
|
|
// Sampled at
|
|
|
|
|
SampledAt float64 `json:"sampled_at"`
|
|
|
|
|
|
|
|
|
|
// Percent
|
|
|
|
|
Percent float64 `json:"percent"`
|
|
|
|
|
|
|
|
|
|
// Bytes per second
|
|
|
|
|
BytesPerSecond float64 `json:"bytes_per_second"`
|
|
|
|
|
|
|
|
|
|
// Processed bytes
|
|
|
|
|
ProcessedBytes uint64 `json:"processed_bytes"`
|
|
|
|
|
|
|
|
|
|
// Remaining bytes
|
|
|
|
|
RemainingBytes uint64 `json:"remaining_bytes"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2ProgressDisks describes a disks progress of a migration
|
|
|
|
|
type MigrateV2ProgressDisks struct {
|
|
|
|
|
// Sampled at
|
|
|
|
|
SampledAt float64 `json:"sampled_at"`
|
|
|
|
|
|
|
|
|
|
// Percent
|
|
|
|
|
Percent float64 `json:"percent"`
|
|
|
|
|
|
|
|
|
|
// Bytes per second
|
|
|
|
|
BytesPerSecond float64 `json:"bytes_per_second"`
|
|
|
|
|
|
|
|
|
|
// Processed bytes
|
|
|
|
|
ProcessedBytes uint64 `json:"processed_bytes"`
|
|
|
|
|
|
|
|
|
|
// Remaining bytes
|
|
|
|
|
RemainingBytes uint64 `json:"remaining_bytes"`
|
|
|
|
|
|
|
|
|
|
// Percent is estimated
|
|
|
|
|
PercentIsEstimated bool `json:"percent_is_estimated"`
|
|
|
|
|
|
|
|
|
|
// Disks total
|
|
|
|
|
DisksTotal uint64 `json:"disks_total"`
|
|
|
|
|
|
|
|
|
|
// Disks completed
|
|
|
|
|
DisksCompleted uint64 `json:"disks_completed"`
|
|
|
|
|
|
|
|
|
|
// Items
|
|
|
|
|
Items []MigrateV2ProgressItem `json:"items"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Progress describes a progress of a migration
|
|
|
|
|
type MigrateV2Progress struct {
|
|
|
|
|
// Observation
|
|
|
|
|
Observation MigrateV2Observation `json:"observation"`
|
|
|
|
|
|
|
|
|
|
// Memory
|
|
|
|
|
Memory MigrateV2Memory `json:"memory"`
|
|
|
|
|
|
|
|
|
|
// Disks
|
|
|
|
|
Disks MigrateV2ProgressDisks `json:"disks"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Disk describes a disk of a migration
|
|
|
|
|
type MigrateV2Disk struct {
|
|
|
|
|
// Source disk ID
|
|
|
|
|
SourceDiskID uint64 `json:"source_disk_id"`
|
|
|
|
|
|
|
|
|
|
// Target disk ID
|
|
|
|
|
TargetDiskID uint64 `json:"target_disk_id"`
|
|
|
|
|
|
|
|
|
|
// SEP ID
|
|
|
|
|
SEPID uint64 `json:"sep_id"`
|
|
|
|
|
|
|
|
|
|
// Pool name
|
|
|
|
|
PoolName string `json:"pool_name"`
|
|
|
|
|
|
|
|
|
|
// Storage policy ID
|
|
|
|
|
StoragePolicyID uint64 `json:"storage_policy_id"`
|
|
|
|
|
|
|
|
|
|
// State
|
|
|
|
|
State string `json:"state"`
|
|
|
|
|
|
|
|
|
|
// Copy node ID
|
|
|
|
|
CopyNodeID uint64 `json:"copy_node_id"`
|
|
|
|
|
|
|
|
|
|
// Copy state
|
|
|
|
|
CopyState string `json:"copy_state"`
|
|
|
|
|
|
|
|
|
|
// Writer stopped
|
|
|
|
|
WriterStopped bool `json:"writer_stopped"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2CleanupInfo describes a cleanup of a migration
|
|
|
|
|
type MigrateV2CleanupInfo struct {
|
|
|
|
|
// Job ID
|
|
|
|
|
JobID string `json:"job_id"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// Error
|
|
|
|
|
Error string `json:"error"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Resolution describes a resolution of a migration
|
|
|
|
|
type MigrateV2Resolution struct {
|
|
|
|
|
// Resolved at
|
|
|
|
|
ResolvedAt string `json:"resolved_at"`
|
|
|
|
|
|
|
|
|
|
// Resolved by
|
|
|
|
|
ResolvedBy string `json:"resolved_by"`
|
|
|
|
|
|
|
|
|
|
// Request ID
|
|
|
|
|
RequestID string `json:"request_id"`
|
|
|
|
|
|
|
|
|
|
// Take over cleanup
|
|
|
|
|
TakeOverCleanup bool `json:"take_over_cleanup"`
|
|
|
|
|
|
|
|
|
|
// Previous status
|
|
|
|
|
PreviousStatus string `json:"previous_status"`
|
|
|
|
|
|
|
|
|
|
// Previous cleanup required
|
|
|
|
|
PreviousCleanupRequired bool `json:"previous_cleanup_required"`
|
|
|
|
|
|
|
|
|
|
// Previous error
|
|
|
|
|
PreviousError string `json:"previous_error"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Item describes a disks migration in a list
|
|
|
|
|
type MigrateV2Item struct {
|
|
|
|
|
// Workflow job ID
|
|
|
|
|
WorkflowJobID string `json:"workflow_job_id"`
|
|
|
|
|
|
|
|
|
|
// User
|
|
|
|
|
User string `json:"user"`
|
|
|
|
|
|
|
|
|
|
// Execution kind
|
|
|
|
|
ExecutionKind string `json:"execution_kind"`
|
|
|
|
|
|
|
|
|
|
// Bandwidth bytes per second
|
|
|
|
|
BandwidthBytesPerSecond uint64 `json:"bandwidth_bytes_per_second"`
|
|
|
|
|
|
|
|
|
|
// Copy parallelism
|
|
|
|
|
CopyParallelism uint64 `json:"copy_parallelism"`
|
|
|
|
|
|
|
|
|
|
// Source disks
|
|
|
|
|
SourceDisks []MigrateV2SourceDisk `json:"source_disks"`
|
|
|
|
|
|
|
|
|
|
// Requested storage
|
|
|
|
|
RequestedStorage MigrateV2RequestedStorage `json:"requested_storage"`
|
|
|
|
|
|
|
|
|
|
// Disk plan ready
|
|
|
|
|
DiskPlanReady bool `json:"disk_plan_ready"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs
|
|
|
|
|
DiskIDs []uint64 `json:"disk_ids"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs not copied
|
|
|
|
|
DiskIDsNotCopied []uint64 `json:"disk_ids_not_copied"`
|
|
|
|
|
|
|
|
|
|
// Account ID
|
|
|
|
|
AccountID uint64 `json:"account_id"`
|
|
|
|
|
|
|
|
|
|
// Origin
|
|
|
|
|
Origin MigrateV2Origin `json:"origin"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// Progress
|
|
|
|
|
Progress MigrateV2Progress `json:"progress"`
|
|
|
|
|
|
|
|
|
|
// Migration result confirmed
|
|
|
|
|
MigrationResultConfirmed bool `json:"migration_result_confirmed"`
|
|
|
|
|
|
|
|
|
|
// Offline commit started
|
|
|
|
|
OfflineCommitStarted bool `json:"offline_commit_started"`
|
|
|
|
|
|
|
|
|
|
// Disks
|
|
|
|
|
Disks []MigrateV2Disk `json:"disks"`
|
|
|
|
|
|
|
|
|
|
// Error
|
|
|
|
|
Error string `json:"error"`
|
|
|
|
|
|
|
|
|
|
// Cleanup required
|
|
|
|
|
CleanupRequired bool `json:"cleanup_required"`
|
|
|
|
|
|
|
|
|
|
// Cleanup
|
|
|
|
|
Cleanup MigrateV2CleanupInfo `json:"cleanup"`
|
|
|
|
|
|
|
|
|
|
// Resolution
|
|
|
|
|
Resolution MigrateV2Resolution `json:"resolution"`
|
|
|
|
|
|
|
|
|
|
// Created at
|
|
|
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
|
|
|
|
|
|
// Updated at
|
|
|
|
|
UpdatedAt string `json:"updated_at"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ListMigrateV2 is a list of disks migrations
|
|
|
|
|
type ListMigrateV2 struct {
|
|
|
|
|
// Entry count
|
|
|
|
|
EntryCount uint64 `json:"entry_count"`
|
|
|
|
|
|
|
|
|
|
// Data
|
|
|
|
|
Data []MigrateV2Item `json:"data"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2Record describes detailed information about a disks migration
|
|
|
|
|
type MigrateV2Record struct {
|
|
|
|
|
// Workflow job ID
|
|
|
|
|
WorkflowJobID string `json:"workflow_job_id"`
|
|
|
|
|
|
|
|
|
|
// User
|
|
|
|
|
User string `json:"user"`
|
|
|
|
|
|
|
|
|
|
// Execution kind
|
|
|
|
|
ExecutionKind string `json:"execution_kind"`
|
|
|
|
|
|
|
|
|
|
// Bandwidth bytes per second
|
|
|
|
|
BandwidthBytesPerSecond uint64 `json:"bandwidth_bytes_per_second"`
|
|
|
|
|
|
|
|
|
|
// Copy parallelism
|
|
|
|
|
CopyParallelism uint64 `json:"copy_parallelism"`
|
|
|
|
|
|
|
|
|
|
// Source disks
|
|
|
|
|
SourceDisks []MigrateV2SourceDisk `json:"source_disks"`
|
|
|
|
|
|
|
|
|
|
// Requested storage
|
|
|
|
|
RequestedStorage MigrateV2RequestedStorage `json:"requested_storage"`
|
|
|
|
|
|
|
|
|
|
// Disk plan ready
|
|
|
|
|
DiskPlanReady bool `json:"disk_plan_ready"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs
|
|
|
|
|
DiskIDs []uint64 `json:"disk_ids"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs not copied
|
|
|
|
|
DiskIDsNotCopied []uint64 `json:"disk_ids_not_copied"`
|
|
|
|
|
|
|
|
|
|
// Account ID
|
|
|
|
|
AccountID uint64 `json:"account_id"`
|
|
|
|
|
|
|
|
|
|
// Origin
|
|
|
|
|
Origin MigrateV2Origin `json:"origin"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// Progress
|
|
|
|
|
Progress MigrateV2Progress `json:"progress"`
|
|
|
|
|
|
|
|
|
|
// Migration result confirmed
|
|
|
|
|
MigrationResultConfirmed bool `json:"migration_result_confirmed"`
|
|
|
|
|
|
|
|
|
|
// Offline commit started
|
|
|
|
|
OfflineCommitStarted bool `json:"offline_commit_started"`
|
|
|
|
|
|
|
|
|
|
// Disks
|
|
|
|
|
Disks []MigrateV2Disk `json:"disks"`
|
|
|
|
|
|
|
|
|
|
// Error
|
|
|
|
|
Error string `json:"error"`
|
|
|
|
|
|
|
|
|
|
// Cleanup required
|
|
|
|
|
CleanupRequired bool `json:"cleanup_required"`
|
|
|
|
|
|
|
|
|
|
// Cleanup
|
|
|
|
|
Cleanup MigrateV2CleanupInfo `json:"cleanup"`
|
|
|
|
|
|
|
|
|
|
// Resolution
|
|
|
|
|
Resolution MigrateV2Resolution `json:"resolution"`
|
|
|
|
|
|
|
|
|
|
// Created at
|
|
|
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
|
|
|
|
|
|
// Updated at
|
|
|
|
|
UpdatedAt string `json:"updated_at"`
|
|
|
|
|
|
|
|
|
|
// Logs
|
|
|
|
|
Logs []string `json:"logs"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2AbortResult describes a result of a migration abort
|
|
|
|
|
type MigrateV2AbortResult struct {
|
|
|
|
|
// Workflow job ID
|
|
|
|
|
WorkflowJobID string `json:"workflow_job_id"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs
|
|
|
|
|
DiskIDs []uint64 `json:"disk_ids"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// Job ID
|
|
|
|
|
JobID string `json:"job_id"`
|
|
|
|
|
|
|
|
|
|
// Message
|
|
|
|
|
Message string `json:"message"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2AbortRecord describes results of migrations abort
|
|
|
|
|
type MigrateV2AbortRecord struct {
|
|
|
|
|
// Results
|
|
|
|
|
Results []MigrateV2AbortResult `json:"results"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MigrateV2ResolveRecord describes a result of a migration resolve
|
|
|
|
|
type MigrateV2ResolveRecord struct {
|
|
|
|
|
// Workflow job ID
|
|
|
|
|
WorkflowJobID string `json:"workflow_job_id"`
|
|
|
|
|
|
|
|
|
|
// Disk IDs
|
|
|
|
|
DiskIDs []uint64 `json:"disk_ids"`
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// Cleanup required
|
|
|
|
|
CleanupRequired bool `json:"cleanup_required"`
|
|
|
|
|
|
|
|
|
|
// Resolution
|
|
|
|
|
Resolution MigrateV2Resolution `json:"resolution"`
|
|
|
|
|
|
|
|
|
|
// Message
|
|
|
|
|
Message string `json:"message"`
|
|
|
|
|
}
|