Files
dynamix-golang-sdk/pkg/sdn/hypervisors/models.go

59 lines
1006 B
Go
Raw Normal View History

2026-04-10 16:47:00 +03:00
package hypervisors
// Main information about hypervisor
type RecordHypervisor struct {
// Created at
CreatedAt string `json:"created_at"`
// Display name
DisplayName string `json:"display_name"`
// Hostname
Hostname string `json:"hostname"`
// IP
IP string `json:"ip"`
// Synced at
SyncedAt string `json:"synced_at"`
// Name
Name string `json:"name"`
// Ports
2026-04-17 17:10:10 +03:00
Ports Ports `json:"ports"`
2026-04-10 16:47:00 +03:00
// Status
Status string `json:"status"`
}
// List of hypervisors
type HypervisorsList []RecordHypervisor
2026-04-17 17:10:10 +03:00
// 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"`
}