git test
This commit is contained in:
58
pkg/sdn/hypervisors/models.go
Normal file
58
pkg/sdn/hypervisors/models.go
Normal file
@@ -0,0 +1,58 @@
|
||||
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
|
||||
Ports Ports `json:"ports"`
|
||||
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user