v1.0.0
This commit is contained in:
110
pkg/template/models/model_get.go
Normal file
110
pkg/template/models/model_get.go
Normal file
@@ -0,0 +1,110 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type RecordTemplateResponse struct {
|
||||
TemplateInfo RecordTemplate `json:"template_info"`
|
||||
RequestID string `json:"request_id"`
|
||||
}
|
||||
|
||||
type RecordTemplate struct {
|
||||
CPULimit int `json:"cpu_limit"`
|
||||
Status string `json:"status"`
|
||||
IoPriority int `json:"io_priority"`
|
||||
HaStatus string `json:"ha_status"`
|
||||
Description string `json:"description"`
|
||||
NodeMask string `json:"node_mask"`
|
||||
Rates any `json:"rates"`
|
||||
IsInfrastructure bool `json:"is_infrastructure"`
|
||||
HaEnabled bool `json:"ha_enabled"`
|
||||
FolderID int `json:"folder_id"`
|
||||
SystemFlags string `json:"system_flags"`
|
||||
UsedByDesktop bool `json:"used_by_desktop"`
|
||||
Location string `json:"location"`
|
||||
GuestOsVersion string `json:"guest_os_version"`
|
||||
MaxRAMSize int `json:"max_ram_size"`
|
||||
ExternalUUID string `json:"external_uuid"`
|
||||
Domain string `json:"domain"`
|
||||
RAMHotplugEnabled bool `json:"ram_hotplug_enabled"`
|
||||
VirtType string `json:"virt_type"`
|
||||
Created time.Time `json:"created"`
|
||||
CPUUnits int `json:"cpu_units"`
|
||||
Ratebound bool `json:"ratebound"`
|
||||
InstallOs bool `json:"install_os"`
|
||||
MonitoringEnabled bool `json:"monitoring_enabled"`
|
||||
RAMSize int `json:"ram_size"`
|
||||
Maxmemory int `json:"maxmemory"`
|
||||
Name string `json:"name"`
|
||||
GuestOs string `json:"guest_os"`
|
||||
CPUSockets int `json:"cpu_sockets"`
|
||||
AutoStartDelay int `json:"auto_start_delay"`
|
||||
CoresCount int `json:"cores_count"`
|
||||
GuestToolsState string `json:"guest_tools_state"`
|
||||
Deleted time.Time `json:"deleted"`
|
||||
ResourcePoolID int `json:"resource_pool_id"`
|
||||
SmbiosUUID string `json:"smbios_uuid"`
|
||||
CPUMask string `json:"cpu_mask"`
|
||||
CPUCount int `json:"cpu_count"`
|
||||
MacAddresses any `json:"mac_addresses"`
|
||||
IsLinkedClone bool `json:"is_linked_clone"`
|
||||
BootDeviceList []BootDevice `json:"boot_device_list"`
|
||||
IopsLimit int `json:"iops_limit"`
|
||||
VncHostname string `json:"vnc_hostname"`
|
||||
Imported bool `json:"imported"`
|
||||
ExternalStorageName string `json:"external_storage_name"`
|
||||
CreationDate time.Time `json:"creation_date"`
|
||||
CPUHotplug bool `json:"cpu_hotplug"`
|
||||
MemGuaranteeSize int `json:"mem_guarantee_size"`
|
||||
LinkedVMID int `json:"linked_vm_id"`
|
||||
ParentUUID string `json:"parent_uuid"`
|
||||
IsVzTemplate bool `json:"is_vz_template"`
|
||||
IoLimit int `json:"io_limit"`
|
||||
Chipset string `json:"chipset"`
|
||||
VncMode string `json:"vnc_mode"`
|
||||
DisableAutobalance bool `json:"disable_autobalance"`
|
||||
ExternalStorageID int `json:"external_storage_id"`
|
||||
ClusterID int `json:"cluster_id"`
|
||||
HaPriority int `json:"ha_priority"`
|
||||
VMID int `json:"vm_id"`
|
||||
ClockOffset string `json:"clock_offset"`
|
||||
Lock bool `json:"lock"`
|
||||
RAMBalloonActualHotplug bool `json:"ram_balloon_actual_hotplug"`
|
||||
VncPassword string `json:"vnc_password"`
|
||||
ExternalResourceName string `json:"external_resource_name"`
|
||||
RAMTotalHotplug int `json:"ram_total_hotplug"`
|
||||
SecureBoot bool `json:"secure_boot"`
|
||||
ExternalResourceID int `json:"external_resource_id"`
|
||||
Affinity string `json:"affinity"`
|
||||
IsTemplate bool `json:"is_template"`
|
||||
NodeID int `json:"node_id"`
|
||||
VncPort int `json:"vnc_port"`
|
||||
LinkedVMUUID string `json:"linked_vm_uuid"`
|
||||
VideoRAMSize int `json:"video_ram_size"`
|
||||
AutoStop string `json:"auto_stop"`
|
||||
TpmEnabled bool `json:"tpm_enabled"`
|
||||
UUID string `json:"uuid"`
|
||||
IPAddress string `json:"ip_address"`
|
||||
Hostname string `json:"hostname"`
|
||||
EfiEnabled bool `json:"efi_enabled"`
|
||||
AutoStart string `json:"auto_start"`
|
||||
LinkedCloneCount int `json:"linked_clone_count"`
|
||||
SnapshotCount int `json:"snapshot_count"`
|
||||
HostDeviceCount int `json:"host_device_count"`
|
||||
Node Node `json:"node"`
|
||||
AllMd5 bool `json:"all_md5"`
|
||||
DisksSize int `json:"disks_size"`
|
||||
TemplateSize float64 `json:"template_size"`
|
||||
FullHardDriveSize int `json:"full_hard_drive_size"`
|
||||
UsedHardDriveSize float64 `json:"used_hard_drive_size"`
|
||||
ParentTree []ParentTree `json:"parent_tree"`
|
||||
}
|
||||
|
||||
// ParentTree represents the parent tree information.
|
||||
type ParentTree struct {
|
||||
VMID int `json:"vm_id"`
|
||||
Name string `json:"name"`
|
||||
UUID string `json:"uuid"`
|
||||
ParentID int `json:"parent_id"`
|
||||
IsTemplate bool `json:"is_template"`
|
||||
Depth int `json:"depth"`
|
||||
}
|
||||
117
pkg/template/models/model_list.go
Normal file
117
pkg/template/models/model_list.go
Normal file
@@ -0,0 +1,117 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type ListTemplate struct {
|
||||
Total int `json:"total"`
|
||||
Page int `json:"page"`
|
||||
PerPage int `json:"per_page"`
|
||||
IsApproximateTotal bool `json:"is_approximate_total"`
|
||||
Items []ItemTemplate `json:"items"`
|
||||
HasMore bool `json:"has_more"`
|
||||
RequestID string `json:"request_id"`
|
||||
}
|
||||
|
||||
type ItemTemplate struct {
|
||||
CPULimit int `json:"cpu_limit"`
|
||||
Status string `json:"status"`
|
||||
IoPriority int `json:"io_priority"`
|
||||
HaStatus string `json:"ha_status"`
|
||||
Description string `json:"description"`
|
||||
NodeMask string `json:"node_mask"`
|
||||
Rates any `json:"rates"`
|
||||
IsInfrastructure bool `json:"is_infrastructure"`
|
||||
HaEnabled bool `json:"ha_enabled"`
|
||||
FolderID int `json:"folder_id"`
|
||||
SystemFlags string `json:"system_flags"`
|
||||
UsedByDesktop bool `json:"used_by_desktop"`
|
||||
Location string `json:"location"`
|
||||
GuestOsVersion string `json:"guest_os_version"`
|
||||
MaxRAMSize int `json:"max_ram_size"`
|
||||
ExternalUUID string `json:"external_uuid"`
|
||||
Domain string `json:"domain"`
|
||||
RAMHotplugEnabled bool `json:"ram_hotplug_enabled"`
|
||||
VirtType string `json:"virt_type"`
|
||||
Created time.Time `json:"created"`
|
||||
CPUUnits int `json:"cpu_units"`
|
||||
Ratebound bool `json:"ratebound"`
|
||||
InstallOs bool `json:"install_os"`
|
||||
MonitoringEnabled bool `json:"monitoring_enabled"`
|
||||
RAMSize int `json:"ram_size"`
|
||||
Maxmemory int `json:"maxmemory"`
|
||||
Name string `json:"name"`
|
||||
GuestOs string `json:"guest_os"`
|
||||
CPUSockets int `json:"cpu_sockets"`
|
||||
AutoStartDelay int `json:"auto_start_delay"`
|
||||
CoresCount int `json:"cores_count"`
|
||||
GuestToolsState string `json:"guest_tools_state"`
|
||||
Deleted time.Time `json:"deleted"`
|
||||
ResourcePoolID int `json:"resource_pool_id"`
|
||||
SmbiosUUID string `json:"smbios_uuid"`
|
||||
CPUMask string `json:"cpu_mask"`
|
||||
CPUCount int `json:"cpu_count"`
|
||||
MacAddresses any `json:"mac_addresses"`
|
||||
IsLinkedClone bool `json:"is_linked_clone"`
|
||||
BootDeviceList []BootDevice `json:"boot_device_list"`
|
||||
IopsLimit int `json:"iops_limit"`
|
||||
VncHostname string `json:"vnc_hostname"`
|
||||
Imported bool `json:"imported"`
|
||||
ExternalStorageName string `json:"external_storage_name"`
|
||||
CreationDate time.Time `json:"creation_date"`
|
||||
CPUHotplug bool `json:"cpu_hotplug"`
|
||||
MemGuaranteeSize int `json:"mem_guarantee_size"`
|
||||
LinkedVMID int `json:"linked_vm_id"`
|
||||
ParentUUID string `json:"parent_uuid"`
|
||||
IsVzTemplate bool `json:"is_vz_template"`
|
||||
IoLimit int `json:"io_limit"`
|
||||
Chipset string `json:"chipset"`
|
||||
VncMode string `json:"vnc_mode"`
|
||||
DisableAutobalance bool `json:"disable_autobalance"`
|
||||
ExternalStorageID int `json:"external_storage_id"`
|
||||
ClusterID int `json:"cluster_id"`
|
||||
HaPriority int `json:"ha_priority"`
|
||||
VMID int `json:"vm_id"`
|
||||
ClockOffset string `json:"clock_offset"`
|
||||
Lock bool `json:"lock"`
|
||||
RAMBalloonActualHotplug bool `json:"ram_balloon_actual_hotplug"`
|
||||
VncPassword string `json:"vnc_password"`
|
||||
ExternalResourceName string `json:"external_resource_name"`
|
||||
RAMTotalHotplug string `json:"ram_total_hotplug"`
|
||||
SecureBoot bool `json:"secure_boot"`
|
||||
ExternalResourceID int `json:"external_resource_id"`
|
||||
Affinity string `json:"affinity"`
|
||||
IsTemplate bool `json:"is_template"`
|
||||
NodeID int `json:"node_id"`
|
||||
VncPort int `json:"vnc_port"`
|
||||
LinkedVMUUID string `json:"linked_vm_uuid"`
|
||||
VideoRAMSize int `json:"video_ram_size"`
|
||||
AutoStop string `json:"auto_stop"`
|
||||
TpmEnabled bool `json:"tpm_enabled"`
|
||||
UUID string `json:"uuid"`
|
||||
IPAddress string `json:"ip_address"`
|
||||
Hostname string `json:"hostname"`
|
||||
EfiEnabled bool `json:"efi_enabled"`
|
||||
AutoStart string `json:"auto_start"`
|
||||
LinkedCloneCount int `json:"linked_clone_count"`
|
||||
SnapshotCount int `json:"snapshot_count"`
|
||||
HostDeviceCount int `json:"host_device_count"`
|
||||
Node Node `json:"node"`
|
||||
AllMd5 bool `json:"all_md5"`
|
||||
DisksSize int `json:"disks_size"`
|
||||
TemplateSize float64 `json:"template_size"`
|
||||
FullHardDriveSize int `json:"full_hard_drive_size"`
|
||||
UsedHardDriveSize float64 `json:"used_hard_drive_size"`
|
||||
}
|
||||
|
||||
// BootDevice represents the boot device information.
|
||||
type BootDevice struct {
|
||||
Type string `json:"type"`
|
||||
InUse bool `json:"in_use"`
|
||||
Index int `json:"index"`
|
||||
}
|
||||
|
||||
// Node represents the node information.
|
||||
type Node struct {
|
||||
Name string `json:"name"`
|
||||
NodeID int `json:"node_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user