This commit is contained in:
2026-03-13 17:20:54 +03:00
parent 5b2866bf0e
commit aa3e9ad4ab
25 changed files with 441 additions and 70 deletions

View File

@@ -9,6 +9,12 @@ import (
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators"
)
// Label struct
type CreateLabels struct {
VMID string `url:"vm_id,omitempty" json:"vm_id,omitempty"`
VMName string `url:"vm_name,omitempty" json:"vm_name,omitempty"`
}
// CreateRequest struct to create logical port
type CreateRequest struct {
// ID of the access group
@@ -27,10 +33,6 @@ type CreateRequest struct {
// Required: true
Enabled interface{} `url:"enabled" json:"enabled" validate:"required,isBool"`
// Is excluded from firewall. True or False
// Required: true
IsExcludedFromFirewall interface{} `url:"is_excluded_from_firewall" json:"is_excluded_from_firewall" validate:"required,isBool"`
// Hypervisor
// Required: true
Hypervisor string `url:"hypervisor" json:"hypervisor" validate:"required"`
@@ -54,6 +56,10 @@ type CreateRequest struct {
// Logical port addresses
// Required: false
LogicalPortAddresses []LogicalPortAddress `url:"logical_port_addresses,omitempty" json:"logical_port_addresses,omitempty" validate:"dive"`
// Labels
// Required: false
Labels CreateLabels `url:"labels,omitempty" json:"labels,omitempty"`
}
// LogicalPortAddressRequest struct representing logical port address