This commit is contained in:
dayterr
2026-04-17 17:04:11 +03:00
parent 5cdae8520f
commit 2bd93e92c2
23 changed files with 758 additions and 118 deletions

View File

@@ -21,7 +21,7 @@ type RecordHypervisor struct {
Name string `json:"name"`
// Ports
Ports []string `json:"ports"`
Ports Ports `json:"ports"`
// Status
Status string `json:"status"`
@@ -29,3 +29,30 @@ type RecordHypervisor struct {
// List of hypervisors
type HypervisorsList []RecordHypervisor
// Hypervisor ports
type Ports struct {
Data []Port `json:"data"`
Info Info `json:"info"`
}
// Info about a port
type Port struct {
// ID of a port
ID string `json:"id"`
// Unique ID of a port
UniqueIdentifier string `json:"unique_identifier"`
// Display name of a port
DisplayName string `json:"display_name"`
// Is a port up
UP bool `json:"up"`
}
// Port counters
type Info struct {
ActivePorts uint64 `json:"active_ports"`
TotalPorts uint64 `json:"total_ports"`
}