This commit is contained in:
asteam
2025-09-26 19:17:30 +03:00
parent 48e2b0f2f9
commit 1ccc37a104
1022 changed files with 6440 additions and 1688 deletions

View File

@@ -425,13 +425,13 @@ type ItemDisk struct {
Password string `json:"passwd"`
// PCI slot
PCISlot int64 `json:"pciSlot"`
PCISlot int64 `json:"pci_slot"`
// Pool
Pool string `json:"pool"`
// Present to
PresentTo []uint64 `json:"presentTo"`
PresentTo map[string]uint64 `json:"presentTo"`
// Purge attempts
PurgeAttempts uint64 `json:"purgeAttempts"`
@@ -469,6 +469,9 @@ type ItemDisk struct {
// Size used
SizeUsed float64 `json:"sizeUsed"`
// Size available
SizeAvailable float64 `json:"sizeAvailable"`
// List detailed snapshots
Snapshots ListDetailedSnapshots `json:"snapshots"`
@@ -482,7 +485,7 @@ type ItemDisk struct {
Type string `json:"type"`
// Updated by
UpdatedBy uint64 `json:"updatedBy,omitempty"`
UpdatedBy string `json:"updatedBy"`
// Virtual machine ID
VMID uint64 `json:"vmid"`
@@ -633,6 +636,9 @@ type InfoCompute struct {
// Boot order
BootOrder []string `json:"bootOrder"`
// Boot type
BootType string `json:"bootType"`
// Boot disk size
BootDiskSize uint64 `json:"bootdiskSize"`
@@ -690,6 +696,9 @@ type InfoCompute struct {
// HPBacked
HPBacked bool `json:"hpBacked"`
// Hot resize
HotResize bool `json:"hotResize"`
// ID
ID uint64 `json:"id"`
@@ -699,6 +708,9 @@ type InfoCompute struct {
// List interfaces
Interfaces ListInterfaces `json:"interfaces"`
// Loader type
LoaderType string `json:"loaderType"`
// Lock status
LockStatus string `json:"lockStatus"`
@@ -720,6 +732,9 @@ type InfoCompute struct {
// Need reboot
NeedReboot bool `json:"needReboot"`
// network interface naming
NetworkInterfaceNaming string `json:"networkInterfaceNaming"`
// Numa Affinity
NumaAffinity string `json:"numaAffinity"`
@@ -729,8 +744,8 @@ type InfoCompute struct {
// List OS users
OSUsers ListOSUsers `json:"osUsers"`
// Pinned
Pinned bool `json:"pinned"`
// Pinned to stack
PinnedToStack int64 `json:"pinnedToStack"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -861,6 +876,9 @@ type RecordCompute struct {
// Boot order
BootOrder []string `json:"bootOrder"`
// Boot type
BootType string `json:"bootType"`
// Boot disk size
BootDiskSize uint64 `json:"bootdiskSize"`
@@ -921,6 +939,9 @@ type RecordCompute struct {
// HPBacked
HPBacked bool `json:"hpBacked"`
// Hot resize
HotResize bool `json:"hotResize"`
// ID
ID uint64 `json:"id"`
@@ -933,6 +954,9 @@ type RecordCompute struct {
// List interfaces
Interfaces ListInterfaces `json:"interfaces"`
// Loader type
LoaderType string `json:"loaderType"`
// Lock status
LockStatus string `json:"lockStatus"`
@@ -972,6 +996,9 @@ type RecordCompute struct {
// Need reboot
NeedReboot bool `json:"needReboot"`
// network interface naming
NetworkInterfaceNaming string `json:"networkInterfaceNaming"`
// NumaAffinity
NumaAffinity string `json:"numaAffinity"`
@@ -981,8 +1008,8 @@ type RecordCompute struct {
// List OS users
OSUsers ListOSUsers `json:"osUsers"`
// Pinned
Pinned bool `json:"pinned"`
// Pinned to stack
PinnedToStack int64 `json:"pinnedToStack"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -1047,8 +1074,8 @@ type RecordCompute struct {
// Userdata
Userdata interface{} `json:"userdata"`
// List VGPU IDs
VGPUs []uint64 `json:"vgpus"`
// List VGPU
VGPUs []VGPUItem `json:"vgpus"`
// Virtual image ID
VirtualImageID uint64 `json:"virtualImageId"`
@@ -1060,6 +1087,65 @@ type RecordCompute struct {
VNCPassword string `json:"vncPasswd"`
}
type VGPUItem struct {
// ID
ID uint64 `json:"id"`
// GID
GID uint64 `json:"gid"`
// Type
Type string `json:"type"`
// Mode
Mode string `json:"mode"`
// Status
Status string `json:"status"`
// ProfileID
ProfileID uint64 `json:"profileId"`
// RAM
RAM uint64 `json:"ram"`
// LastUpdateTime
LastUpdateTime uint64 `json:"lastUpdateTime"`
// CreatedTime
CreatedTime uint64 `json:"createdTime"`
// DeletedTime
DeletedTime uint64 `json:"deletedTime"`
// VMID
VMID uint64 `json:"vmid"`
// PGPuid
PGPuid uint64 `json:"pgpuid"`
// ReferenceID
ReferenceID string `json:"referenceId"`
// AccountID
AccountID uint64 `json:"accountId"`
// RgID
RgID uint64 `json:"rgId"`
// LastClaimedBy
LastClaimedBy uint64 `json:"lastClaimedBy"`
// PCISlot
PCISlot uint64 `json:"pciSlot"`
// BusNumber
BusNumber uint64 `json:"bus_number"`
// GUID
GUID uint64 `json:"guid"`
}
// Information about of disk IDs
type ListInfoDisks []InfoDisk
@@ -1071,6 +1157,24 @@ type ItemCompute struct {
// Main information about compute
InfoCompute
// NID
NID uint64 `json:"nid"`
// Total disk size
TotalDiskSize uint64 `json:"totalDisksSize"`
// VINS connected
VINSConnected uint64 `json:"vinsConnected"`
}
// Main information about compute for list
type ItemDeletedCompute struct {
// List of disk IDs
Disks ListInfoDisks `json:"disks"`
// Main information about compute
InfoCompute
// Total disk size
TotalDiskSize uint64 `json:"totalDisksSize"`
@@ -1080,14 +1184,8 @@ type ItemCompute struct {
// Information Disk
type InfoDisk struct {
// Bus number
BusNumber uint64 `json:"bus_number"`
// ID
ID uint64 `json:"id"`
// PCISlot
PCISlot int64 `json:"pciSlot"`
}
// List computes
@@ -1099,6 +1197,15 @@ type ListComputes struct {
EntryCount uint64 `json:"entryCount"`
}
// List computes
type ListDeletedComputes struct {
// Data
Data []ItemDeletedCompute `json:"data"`
// EntryCount
EntryCount uint64 `json:"entryCount"`
}
// Short information about audit
type ItemAudit struct {
// Epoch