You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
5.5 KiB

package models
import "time"
// ListVMResponse represents the entire JSON response
type ListVMResponse struct {
VMList ListVM `json:"vm_list"`
RequestID string `json:"request_id"`
}
// ListVM represents a list of virtual machines.
type ListVM struct {
Total int `json:"total"`
Page int `json:"page"`
PerPage int `json:"per_page"`
IsApproximateTotal bool `json:"is_approximate_total"`
Items []ItemVM `json:"items"`
HasMore bool `json:"has_more"`
}
// ItemVM represents a single virtual machine.
type ItemVM struct {
Domain string `json:"domain"`
Status string `json:"status"`
VMID int `json:"vm_id"`
SystemFlags string `json:"system_flags"`
IopsLimit int `json:"iops_limit"`
IsInfrastructure bool `json:"is_infrastructure"`
TpmEnabled bool `json:"tpm_enabled"`
SecureBoot bool `json:"secure_boot"`
Created time.Time `json:"created"`
ResourcePoolID int `json:"resource_pool_id"`
ExternalStorageID int `json:"external_storage_id"`
AutoStartDelay int `json:"auto_start_delay"`
GuestOsVersion string `json:"guest_os_version"`
RAMSize int `json:"ram_size"`
IsTemplate bool `json:"is_template"`
Description string `json:"description"`
RAMHotplugEnabled bool `json:"ram_hotplug_enabled"`
AutoStart string `json:"auto_start"`
MemGuaranteeSize int `json:"mem_guarantee_size"`
RAMTotalHotplug int `json:"ram_total_hotplug"`
Maxmemory int `json:"maxmemory"`
HaPriority int `json:"ha_priority"`
IoPriority int `json:"io_priority"`
CPUSockets int `json:"cpu_sockets"`
NodeMask string `json:"node_mask"`
MaxRAMSize int `json:"max_ram_size"`
Name string `json:"name"`
CPUMask string `json:"cpu_mask"`
NodeID int `json:"node_id"`
BootDeviceList []BootDevice `json:"boot_device_list"`
DisableAutobalance bool `json:"disable_autobalance"`
CPUUnits int `json:"cpu_units"`
SmbiosUUID string `json:"smbios_uuid"`
InstallOs bool `json:"install_os"`
UsedByDesktop bool `json:"used_by_desktop"`
CPUCount int `json:"cpu_count"`
VirtType string `json:"virt_type"`
VncPassword string `json:"vnc_password"`
VncHostname string `json:"vnc_hostname"`
Ratebound bool `json:"ratebound"`
EfiEnabled bool `json:"efi_enabled"`
Affinity string `json:"affinity"`
GuestOs string `json:"guest_os"`
CPUHotplug bool `json:"cpu_hotplug"`
Imported bool `json:"imported"`
ExternalResourceName string `json:"external_resource_name"`
CoresCount int `json:"cores_count"`
AutoStop string `json:"auto_stop"`
Hostname string `json:"hostname"`
VideoRAMSize int `json:"video_ram_size"`
HaStatus string `json:"ha_status"`
MacAddresses []string `json:"mac_addresses"`
ClusterID int `json:"cluster_id"`
ParentUUID string `json:"parent_uuid"`
ClockOffset string `json:"clock_offset"`
IsLinkedClone bool `json:"is_linked_clone"`
GuestToolsState string `json:"guest_tools_state"`
VncMode string `json:"vnc_mode"`
ExternalUUID string `json:"external_uuid"`
Deleted time.Time `json:"deleted"`
LinkedVMUUID string `json:"linked_vm_uuid"`
RAMBalloonActualHotplug int `json:"ram_balloon_actual_hotplug"`
IPAddress string `json:"ip_address"`
Rates any `json:"rates"` //I don't now type
UUID string `json:"uuid"`
CPULimit int `json:"cpu_limit"`
Location string `json:"location"`
CreationDate time.Time `json:"creation_date"`
VncPort int `json:"vnc_port"`
MonitoringEnabled bool `json:"monitoring_enabled"`
ExternalStorageName string `json:"external_storage_name"`
HaEnabled bool `json:"ha_enabled"`
IoLimit int `json:"io_limit"`
ExternalResourceID int `json:"external_resource_id"`
FolderID int `json:"folder_id"`
Lock bool `json:"lock"`
IsVzTemplate bool `json:"is_vz_template"`
Chipset string `json:"chipset"`
LinkedVMID int `json:"linked_vm_id"`
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"`
}