2024-10-18 04:28:31 +00:00
|
|
|
package app
|
|
|
|
|
2024-12-27 19:59:44 +00:00
|
|
|
type Resource struct { // number of virtual cores (usually threads)
|
|
|
|
Reserved int64
|
|
|
|
Free int64
|
|
|
|
Total int64
|
|
|
|
}
|
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
|
|
|
|
Storage map[string]Storage
|
|
|
|
Hardware map[string]Device
|
|
|
|
}
|
2024-10-18 04:28:31 +00:00
|
|
|
|
2024-12-27 19:59:44 +00:00
|
|
|
type Storage struct{}
|
2024-10-18 04:28:31 +00:00
|
|
|
|
|
|
|
type QEMUInstance struct {
|
|
|
|
Name string
|
|
|
|
Proctype string
|
2024-12-27 19:59:44 +00:00
|
|
|
Cores Resource
|
|
|
|
Memory Resource
|
|
|
|
Drive map[int]Volume
|
|
|
|
Disk map[int]Volume
|
|
|
|
Net map[int]Net
|
|
|
|
Device map[int]Device
|
2024-10-18 04:28:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type LXCInstance struct {
|
|
|
|
Name string
|
2024-12-27 19:59:44 +00:00
|
|
|
Cores Resource
|
|
|
|
Memory Resource
|
|
|
|
Swap Resource
|
|
|
|
RootDisk Volume
|
|
|
|
MP map[int]Volume
|
|
|
|
Net map[int]Net
|
|
|
|
}
|
|
|
|
|
|
|
|
type Volume struct {
|
|
|
|
Format string
|
|
|
|
Path string
|
|
|
|
Size string
|
|
|
|
Used string
|
|
|
|
}
|
|
|
|
|
|
|
|
type Net struct{}
|
|
|
|
|
|
|
|
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
|
|
|
}
|