v1.15.5
This commit is contained in:
dayterr
2026-07-10 15:37:02 +03:00
parent 6ff4b83368
commit 416a6c4263
15 changed files with 571 additions and 100 deletions

View File

@@ -55,34 +55,35 @@ type CreateRequest struct {
// Logical port addresses
// Required: false
LogicalPortAddresses []LogicalPortAddress `url:"logical_port_addresses,omitempty" json:"logical_port_addresses,omitempty" validate:"dive"`
LogicalPortAddresses []LogicalPortAddressRequest `url:"logical_port_addresses,omitempty" json:"logical_port_addresses,omitempty" validate:"dive"`
// Labels
// Required: false
Labels CreateLabels `url:"labels,omitempty" json:"labels,omitempty"`
Labels *CreateLabels `url:"labels,omitempty" json:"labels"`
}
// LogicalPortAddressRequest struct representing logical port address
type LogicalPortAddressRequest struct {
// IP address
// IP address. IPv4 or IPv6 address of the logical port
// If nil (allowed only when IsPrimary is true), the system will automatically generate a valid address
// Required: true
IP string `url:"ip" json:"ip" validate:"required"`
IP interface{} `url:"ip" json:"ip" validate:"omitempty,isString"`
// IP type
// Required: true
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
// Is primary. True or False
// Is primary
// Required: true
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`
// Is discovered
// Required: true
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
// MAC address
// Required: false
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
// Is discovered. True or False
// Required: true
IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"`
}
// Create creates a logical port

View File

@@ -34,6 +34,9 @@ type LogicalPort struct {
// Enabled
Enabled bool `json:"enabled"`
// Exclude firewall information
ExcludeFirewall ExcludeFirewall `json:"exclude_firewall"`
// External network ID
ExternalNetworkID string `json:"external_network_id"`
@@ -162,6 +165,18 @@ type MigrationStatus struct {
VersionID uint64 `json:"version_id"`
}
// ExcludeFirewall information
type ExcludeFirewall struct {
// Exclusion reason
ExclusionReason string `json:"exclusion_reason"`
// Whether logical port addresses are excluded from firewall
LogicalPortAddressesExcluded bool `json:"logical_port_addresses_excluded"`
// Whether logical port is excluded from firewall
LogicalPortExcluded bool `json:"logical_port_excluded"`
}
// Labels information
type Labels struct {
// VM ID

View File

@@ -67,7 +67,7 @@ type UpdateRequest struct {
// Labels
// Required: false
Labels UpdateLabels `url:"labels,omitempty" json:"labels,omitempty"`
Labels *UpdateLabels `url:"labels,omitempty" json:"labels"`
}
// UpdateAddress struct representing update address
@@ -86,7 +86,7 @@ type UpdateAddress struct {
// Is discovered. True or False
// Required: true
IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"`
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
// Is primary. True or False
// Required: true
@@ -107,11 +107,11 @@ type AddAddress struct {
// Required: true
IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"`
// Is discovered. True or False
// Is discovered
// Required: true
IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"`
IsDiscovered interface{} `url:"is_discovered" json:"is_discovered" validate:"required,isBool"`
// Is primary. True or False
// Is primary
// Required: true
IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"`