v12.8.0
This commit is contained in:
158
pkg/sdn/logicalports/models.go
Normal file
158
pkg/sdn/logicalports/models.go
Normal file
@@ -0,0 +1,158 @@
|
||||
package logicalports
|
||||
|
||||
// LogicalPortsList represents a list of logical ports
|
||||
type LogicalPortsList struct {
|
||||
Ports []LogicalPort `json:"ports"`
|
||||
}
|
||||
|
||||
// Main information about logical port
|
||||
type LogicalPort struct {
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Access group name
|
||||
AccessGroupName string `json:"access_group_name"`
|
||||
|
||||
// Adapter MAC
|
||||
AdapterMAC string `json:"adapter_mac"`
|
||||
|
||||
// Address detection
|
||||
AddressDetection bool `json:"address_detection"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Created time
|
||||
CreatedAt string `json:"created_at"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// External network ID
|
||||
ExternalNetworkID string `json:"external_network_id"`
|
||||
|
||||
// Hypervisor
|
||||
Hypervisor string `json:"hypervisor"`
|
||||
|
||||
// Hypervisor display name
|
||||
HypervisorDisplayName string `json:"hypervisor_display_name"`
|
||||
|
||||
// Live migration target hypervisor
|
||||
LiveMigrationTargetHV string `json:"live_migration_target_hv"`
|
||||
|
||||
// Status information
|
||||
Status Status `json:"status"`
|
||||
|
||||
// Bindings information
|
||||
Bindings Bindings `json:"bindings"`
|
||||
|
||||
// Unique identifier
|
||||
UniqueIdentifier string `json:"unique_identifier"`
|
||||
|
||||
// Updated time
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// Status information
|
||||
type Status struct {
|
||||
// Common status
|
||||
Common string `json:"common"`
|
||||
|
||||
// Hypervisors status
|
||||
Hypervisors []HypervisorStatus `json:"hypervisors"`
|
||||
}
|
||||
|
||||
// HypervisorStatus information
|
||||
type HypervisorStatus struct {
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Hypervisor status
|
||||
HypervisorStatus string `json:"hypervisor_status"`
|
||||
|
||||
// Synced time
|
||||
SyncedAt string `json:"synced_at"`
|
||||
}
|
||||
|
||||
// Bindings information
|
||||
type Bindings struct {
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Segment display name
|
||||
SegmentDisplayName string `json:"segment_display_name"`
|
||||
|
||||
// Segment ID
|
||||
SegmentID string `json:"segment_id"`
|
||||
|
||||
// Port security
|
||||
PortSecurity bool `json:"port_security"`
|
||||
|
||||
// Address detection
|
||||
AddressDetection bool `json:"address_detection"`
|
||||
|
||||
// Is excluded from firewall
|
||||
IsExcludedFromFirewall bool `json:"is_excluded_from_firewall"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// Created time
|
||||
CreatedAt string `json:"created_at"`
|
||||
|
||||
// Updated time
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// Logical port addresses
|
||||
LogicalPortAddresses []LogicalPortAddress `json:"logical_port_addresses"`
|
||||
}
|
||||
|
||||
// LogicalPortAddress information
|
||||
type LogicalPortAddress struct {
|
||||
// IP address
|
||||
IP string `json:"ip"`
|
||||
|
||||
// IP type
|
||||
IPType string `json:"ip_type"`
|
||||
|
||||
// Is discovered
|
||||
IsDiscovered bool `json:"is_discovered"`
|
||||
|
||||
// Is primary
|
||||
IsPrimary bool `json:"is_primary"`
|
||||
|
||||
// MAC address
|
||||
MAC string `json:"mac"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Logical port ID
|
||||
LogicalPortID string `json:"logical_port_id"`
|
||||
|
||||
// Assigned time
|
||||
AssignedAt string `json:"assigned_at"`
|
||||
}
|
||||
|
||||
type MigrationStatus struct {
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user