Files
decort-golang-sdk/pkg/cloudapi/disks/models.go

541 lines
9.2 KiB
Go
Raw Normal View History

2022-10-03 16:56:47 +03:00
package disks
2022-12-22 17:56:47 +03:00
// Main information about disk
type ItemDisk struct {
// Access Control List
ACL map[string]interface{} `json:"acl"`
// Account ID
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
2023-01-23 15:39:41 +03:00
// Computes
Computes map[string]string `json:"computes"`
2022-12-22 17:56:47 +03:00
2025-04-09 11:21:07 +03:00
//Created by
CreatedBy string `json:"createdBy"`
2022-12-22 17:56:47 +03:00
// Created time
CreatedTime uint64 `json:"createdTime"`
2025-04-09 11:21:07 +03:00
// Deleted by
DeletedBy string `json:"deletedBy"`
2022-12-22 17:56:47 +03:00
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Device name
DeviceName string `json:"devicename"`
// Description
Description string `json:"desc"`
// Destruction time
DestructionTime uint64 `json:"destructionTime"`
// Grid ID
GID uint64 `json:"gid"`
// ID
ID uint64 `json:"id"`
// Image ID
ImageID uint64 `json:"imageId"`
// List of image IDs
Images []uint64 `json:"images"`
// IOTune
IOTune IOTune `json:"iotune"`
// Machine ID
MachineID uint64 `json:"machineId"`
// Machine name
MachineName string `json:"machineName"`
2025-04-09 11:21:07 +03:00
// Milestones
Milestones uint64 `json:"milestones"`
2022-12-22 17:56:47 +03:00
// Name
Name string `json:"name"`
// Order
Order uint64 `json:"order"`
// Params
Params string `json:"params"`
// Parent ID
ParentID uint64 `json:"parentId"`
// PCI slot
2023-01-23 15:39:41 +03:00
PCISlot int64 `json:"pciSlot"`
2022-12-22 17:56:47 +03:00
// Pool
Pool string `json:"pool"`
2023-01-23 15:39:41 +03:00
// Present to
2025-04-09 11:21:07 +03:00
PresentTo map[string]uint64 `json:"presentTo"`
2023-01-23 15:39:41 +03:00
2022-12-22 17:56:47 +03:00
// Purge time
PurgeTime uint64 `json:"purgeTime"`
2024-04-16 14:26:06 +03:00
// Replication
2024-05-31 13:35:39 +03:00
Replication ItemReplication `json:"replication"`
2024-04-16 14:26:06 +03:00
2022-12-22 17:56:47 +03:00
// Resource ID
ResID string `json:"resId"`
// Resource name
ResName string `json:"resName"`
// Role
Role string `json:"role"`
// SepType
SepType string `json:"sepType"`
2023-01-23 15:39:41 +03:00
// Shareable
Shareable bool `json:"shareable"`
2022-12-22 17:56:47 +03:00
// SepID
SepID uint64 `json:"sepId"`
2025-04-09 11:21:07 +03:00
// Size available
2025-04-11 11:17:52 +03:00
SizeAvailable float64 `json:"sizeAvailable"`
2025-04-09 11:21:07 +03:00
2022-12-22 17:56:47 +03:00
// Size max
SizeMax uint64 `json:"sizeMax"`
2023-01-23 15:39:41 +03:00
// Size used
2023-02-13 12:06:43 +03:00
SizeUsed float64 `json:"sizeUsed"`
2023-01-23 15:39:41 +03:00
2022-12-22 17:56:47 +03:00
// List of snapshots
Snapshots ListSnapshots `json:"snapshots"`
// Status
Status string `json:"status"`
2025-08-29 12:51:25 +03:00
// Storage policy ID
StoragePolicyID uint64 `json:"storage_policy_id"`
2022-12-22 17:56:47 +03:00
// Tech status
TechStatus string `json:"techStatus"`
2025-08-29 12:51:25 +03:00
// Need to clean before destroy
ToClean bool `json:"to_clean"`
2022-12-22 17:56:47 +03:00
// Type
Type string `json:"type"`
// Virtual machine ID
VMID uint64 `json:"vmid"`
2025-04-09 11:21:07 +03:00
// Update time
UpdatedTime uint64 `json:"updatedTime"`
// Updated by
UpdatedBy string `json:"updatedBy"`
2026-01-16 16:50:40 +03:00
// Cache mode of disk
Cache string `json:"cache"`
2022-10-03 16:56:47 +03:00
}
2023-04-20 11:17:35 +03:00
type ItemDiskUnattached struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Account ID
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
// Access Control List
ACL map[string]interface{} `json:"acl"`
// Boot Partition
BootPartition uint64 `json:"bootPartition"`
// 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"`
// Images
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"`
//PCISlot
PCISlot int64 `json:"pciSlot"`
// Pool
Pool string `json:"pool"`
// Present to
2025-04-09 11:21:07 +03:00
PresentTo map[string]uint64 `json:"presentTo"`
2023-04-20 11:17:35 +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"`
// Resource ID
ResID string `json:"resId"`
// Resource name
ResName string `json:"resName"`
// Role
Role string `json:"role"`
// ID SEP
SEPID uint64 `json:"sepId"`
// Shareable
Shareable bool `json:"shareable"`
// Size max
SizeMax uint64 `json:"sizeMax"`
// Size used
SizeUsed float64 `json:"sizeUsed"`
// List of snapshots
Snapshots ListSnapshots `json:"snapshots"`
// Status
Status string `json:"status"`
// Tech status
TechStatus string `json:"techStatus"`
// Type
Type string `json:"type"`
// Virtual machine ID
VMID uint64 `json:"vmid"`
}
2023-06-30 11:21:47 +03:00
// List of disks searched
type ListSearchDisks []ItemDisk
2022-12-22 17:56:47 +03:00
// List of disks
2023-06-30 11:21:47 +03:00
type ListDisks struct {
// Data
Data []ItemDisk `json:"data"`
// Entry count
EntryCount uint64 `json:"entryCount"`
}
2022-12-22 17:56:47 +03:00
2023-04-20 11:17:35 +03:00
// List of unattached disks
2023-06-30 11:21:47 +03:00
type ListDisksUnattached struct {
2024-05-31 13:35:39 +03:00
// Data
2023-06-30 11:21:47 +03:00
Data []ItemDiskUnattached `json:"data"`
2024-05-31 13:35:39 +03:00
// Entry count
2023-06-30 11:21:47 +03:00
EntryCount uint64 `json:"entryCount"`
}
2023-04-20 11:17:35 +03:00
2022-12-22 17:56:47 +03:00
// Main information about snapshot
type ItemSnapshot struct {
// GUID
GUID string `json:"guid"`
// Label
Label string `json:"label"`
2023-06-30 11:21:47 +03:00
ReferenceID string `json:"referenceId"`
2022-12-22 17:56:47 +03:00
// Resource ID
ResID string `json:"resId"`
// SnapSetGUID
SnapSetGUID string `json:"snapSetGuid"`
// SnapSetTime
2022-10-03 16:56:47 +03:00
SnapSetTime uint64 `json:"snapSetTime"`
2022-12-22 17:56:47 +03:00
// TimeStamp
TimeStamp uint64 `json:"timestamp"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of snapshots
type ListSnapshots []ItemSnapshot
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// Main information about IO tune
2022-10-03 16:56:47 +03:00
type IOTune struct {
2022-12-22 17:56:47 +03:00
// 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
2022-10-03 16:56:47 +03:00
TotalBytesSecMax uint64 `json:"total_bytes_sec_max"`
2022-12-22 17:56:47 +03:00
// TotalIOPSSec
TotalIOPSSec uint64 `json:"total_iops_sec"`
// TotalIOPSSecMax
TotalIOPSSecMax uint64 `json:"total_iops_sec_max"`
// WriteBytesSec
WriteBytesSec uint64 `json:"write_bytes_sec"`
// WriteBytesSecMax
2022-10-03 16:56:47 +03:00
WriteBytesSecMax uint64 `json:"write_bytes_sec_max"`
2022-12-22 17:56:47 +03:00
// WriteIOPSSec
WriteIOPSSec uint64 `json:"write_iops_sec"`
// WriteIOPSSecMax
WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Detailed information about disk
type RecordDisk struct {
// Access Control List
ACL map[string]interface{} `json:"acl"`
// Account ID
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
2023-01-23 15:39:41 +03:00
// Computes
Computes map[string]string `json:"computes"`
2025-04-09 11:21:07 +03:00
// Created by
CreatedBy string `json:"createdBy"`
2022-12-22 17:56:47 +03:00
// Created time
CreatedTime uint64 `json:"createdTime"`
2025-04-09 11:21:07 +03:00
// Deleted by
DeletedBy string `json:"deletedBy"`
2022-12-22 17:56:47 +03:00
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Device name
DeviceName string `json:"devicename"`
// Description
Description string `json:"desc"`
// Destruction time
DestructionTime uint64 `json:"destructionTime"`
// Grid ID
GID uint64 `json:"gid"`
// ID
ID uint64 `json:"id"`
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// Image ID
ImageID uint64 `json:"imageId"`
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// List of image IDs
Images []uint64 `json:"images"`
// IOTune
IOTune IOTune `json:"iotune"`
2025-04-09 11:21:07 +03:00
// Machine ID
MachineID uint64 `json:"machineId"`
// Machine name
MachineName string `json:"machineName"`
// Milestones
Milestones uint64 `json:"milestones"`
2022-12-22 17:56:47 +03:00
// Name
Name string `json:"name"`
// Order
Order uint64 `json:"order"`
// Params
Params string `json:"params"`
// Parent ID
ParentID uint64 `json:"parentId"`
// PCI slot
2023-04-28 11:46:58 +03:00
PCISlot int64 `json:"pciSlot"`
2022-12-22 17:56:47 +03:00
// Pool
Pool string `json:"pool"`
2023-01-23 15:39:41 +03:00
// Present to
2025-04-09 11:21:07 +03:00
PresentTo map[string]uint64 `json:"presentTo"`
2023-01-23 15:39:41 +03:00
2022-12-22 17:56:47 +03:00
// Purge time
PurgeTime uint64 `json:"purgeTime"`
2024-04-16 14:26:06 +03:00
// Replication
2024-05-31 13:35:39 +03:00
Replication ItemReplication `json:"replication"`
2024-04-16 14:26:06 +03:00
2022-12-22 17:56:47 +03:00
// Resource ID
ResID string `json:"resId"`
// Resource name
ResName string `json:"resName"`
// Role
Role string `json:"role"`
// SepType
SepType string `json:"sepType"`
// SepID
2022-10-03 16:56:47 +03:00
SepID uint64 `json:"sepId"`
2023-01-23 15:39:41 +03:00
// Shareable
Shareable bool `json:"shareable"`
2025-04-09 11:21:07 +03:00
// Size available
2025-04-11 11:17:52 +03:00
SizeAvailable float64 `json:"sizeAvailable"`
2025-04-09 11:21:07 +03:00
2022-12-22 17:56:47 +03:00
// Size max
SizeMax uint64 `json:"sizeMax"`
// Size used
2023-02-13 12:06:43 +03:00
SizeUsed float64 `json:"sizeUsed"`
2022-12-22 17:56:47 +03:00
// List of snapshots
Snapshots ListSnapshots `json:"snapshots"`
// Status
Status string `json:"status"`
2025-08-29 12:51:25 +03:00
// Storage policy ID
StoragePolicyID uint64 `json:"storage_policy_id"`
2022-12-22 17:56:47 +03:00
// Tech status
TechStatus string `json:"techStatus"`
2025-08-29 12:51:25 +03:00
// Need to clean before destroy
ToClean bool `json:"to_clean"`
2022-12-22 17:56:47 +03:00
// Type
Type string `json:"type"`
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// Virtual machine ID
VMID uint64 `json:"vmid"`
2025-04-09 11:21:07 +03:00
// Update time
UpdatedTime uint64 `json:"updatedTime"`
// Updated by
UpdatedBy string `json:"updatedBy"`
2026-01-16 16:50:40 +03:00
// Cache mode of disk
Cache string `json:"cache"`
2022-10-03 16:56:47 +03:00
}
2023-07-07 12:40:03 +03:00
2024-05-31 13:35:39 +03:00
type ItemReplication struct {
// DiskID
DiskID uint64 `json:"diskId"`
// PoolID
PoolID string `json:"poolId"`
// Role
Role string `json:"role"`
// SelfVolumeID
SelfVolumeID string `json:"selfVolumeId"`
// StorageID
StorageID string `json:"storageId"`
// VolumeID
VolumeID string `json:"volumeId"`
}
2023-07-07 12:40:03 +03:00
type ListTypes struct {
// Data
Data []interface{} `json:"data"`
// Entry count
EntryCount uint64 `json:"entryCount"`
}