package models import "time" // DisableInfoResponse represents the response containing disable information for a VM operation. type DisableInfoResponse struct { DisableInfo DisableInfo `json:"task_info"` RequestID string `json:"request_id"` } // DisableInfo represents the detailed task information for a VM operation. type DisableInfo struct { Progress int `json:"progress"` RequestID string `json:"request_id"` Finished time.Time `json:"finished"` ParentID int `json:"parent_id"` NodeID int `json:"node_id"` Error string `json:"error"` VMID int `json:"vm_id"` NewVMStatus string `json:"new_vm_status"` CurrentVMStatus string `json:"current_vm_status"` Snapshot string `json:"snapshot"` InitiatorID int `json:"initiator_id"` Type string `json:"type"` Started time.Time `json:"started"` TimeoutAt time.Time `json:"timeout_at"` NewNodeID int `json:"new_node_id"` Status string `json:"status"` Command string `json:"command"` Created time.Time `json:"created"` HasChildren bool `json:"has_children"` Initiator Initiator `json:"initiator"` Node TaskNode `json:"node"` Cluster Cluster `json:"cluster"` VM VM `json:"vm"` } // Initiator represents the initiator of the task. type Initiator struct { Name string `json:"name"` UserID int `json:"user_id"` Email string `json:"email"` Login string `json:"login"` } // TaskNode represents the node information. type TaskNode struct { ServerUUID string `json:"server_uuid"` SDKStatus string `json:"sdk_status"` NodeID int `json:"node_id"` Status string `json:"status"` Compute bool `json:"compute"` Name string `json:"name"` VStorageClusterID int `json:"vstorage_cluster_id"` VStorageStatus string `json:"vstorage_status"` MaintenanceStatus string `json:"maintenance_status"` StorageStatus string `json:"storage_status"` ClusterID int `json:"cluster_id"` IPAddress string `json:"ip_address"` Deleted time.Time `json:"deleted"` Modified time.Time `json:"modified"` VStorageHostID int `json:"vstorage_host_id"` Description string `json:"description"` Created time.Time `json:"created"` } // Cluster represents the cluster information. type Cluster struct { CPUOvercommit float64 `json:"cpu_overcommit"` FenixPingIP string `json:"fenix_ping_ip"` Created time.Time `json:"created"` FenixClusterStatus string `json:"fenix_cluster_status"` StorageName string `json:"storage_name"` FenixBalancingStrategy string `json:"fenix_balancing_strategy"` FenixEnabled bool `json:"fenix_enabled"` Name string `json:"name"` VStorageClusterID int `json:"vstorage_cluster_id"` FenixClusterID int `json:"fenix_cluster_id"` FenixBroadcastIP string `json:"fenix_broadcast_ip"` DRSMode string `json:"drs_mode"` MemoryOvercommit float64 `json:"memory_overcommit"` ClusterID int `json:"cluster_id"` StorageType string `json:"storage_type"` Deleted time.Time `json:"deleted"` Modified time.Time `json:"modified"` NodeCount int `json:"node_count"` VMTotalRAM int `json:"vm_total_ram"` VMCount int `json:"vm_count"` } // VM represents the virtual machine information. type VM struct { VMID int `json:"vm_id"` Name string `json:"name"` UUID string `json:"uuid"` IPAddress string `json:"ip_address"` Status string `json:"status"` LinkedCloneCount int `json:"linked_clone_count"` SnapshotCount int `json:"snapshot_count"` HostDeviceCount int `json:"host_device_count"` Node NodeRef `json:"node"` SMBIOSUUID string `json:"smbios_uuid"` AllMD5 bool `json:"all_md5"` } // NodeRef represents a reference to a node, used within VM information. type NodeRef struct { NodeID int `json:"node_id"` Name string `json:"name"` }