65 lines
1.2 KiB
Go
Raw Normal View History

2024-10-18 04:28:31 +00:00
package app
import "github.com/luthermonson/go-proxmox"
2025-01-10 01:08:44 +00:00
type Resource struct {
Reserved uint64
Free uint64
Total uint64
2024-12-27 19:59:44 +00:00
}
2024-10-18 04:28:31 +00:00
2024-12-27 19:59:44 +00:00
type Host struct {
Name string
Cores Resource
Memory Resource
Swap Resource
Devices map[string]*Device
Instances map[uint]*Instance
node *proxmox.Node
2024-12-27 19:59:44 +00:00
}
2024-10-18 04:28:31 +00:00
type InstanceType string
const (
VM InstanceType = "VM"
CT InstanceType = "CT"
)
type Instance struct {
2025-01-10 01:08:44 +00:00
Type InstanceType
Name string
Proctype string
Cores uint64
Memory uint64
Swap uint64
Volumes map[string]*Volume
Nets map[uint]*Net
Devices map[uint][]*Device
2025-01-10 01:08:44 +00:00
config interface{}
configDisks map[string]string
configNets map[string]string
configHostPCIs map[string]string
proxmox.ContainerInterface
2024-12-27 19:59:44 +00:00
}
type Volume struct {
Path string
Format string
Size uint64
Volid string
2024-12-27 19:59:44 +00:00
}
type Net struct {
Rate uint64
VLAN uint64
}
type Device struct {
BusID string `json:"id"`
DeviceName string `json:"device_name"`
VendorName string `json:"vendor_name"`
SubsystemDeviceName string `json:"subsystem_device_name"`
SubsystemVendorName string `json:"subsystem_vendor_name"`
Reserved bool
2024-10-18 04:28:31 +00:00
}