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