v16.7.0
v16.7.0
This commit is contained in:
1 parent
025a1274f4
commit
70edc100d5
83 files changed
+2240
-554
No files matched your search
+229
-105
@@ -54,7 +54,7 @@ type CreateRequest struct {
|
||||
|
||||
// VLAN tag identifier
|
||||
// Required: false
|
||||
VLANTag string `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty" validate:"omitempty,trunkTags"`
|
||||
VLANTag uint64 `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty" validate:"omitempty,min=1,max=4094"`
|
||||
}
|
||||
|
||||
type ExternalNetworkPortRequest struct {
|
||||
@@ -63,8 +63,8 @@ type ExternalNetworkPortRequest struct {
|
||||
AccessGroupID string `url:"access_group_id" json:"access_group_id" validate:"required"`
|
||||
|
||||
// Access group name
|
||||
// Required: false
|
||||
AccessGroupName string `url:"access_group_name,omitempty" json:"access_group_name,omitempty"`
|
||||
// Required: true
|
||||
AccessGroupName string `url:"access_group_name" json:"access_group_name" validate:"required"`
|
||||
|
||||
// Comment for the external network port
|
||||
// Required: true
|
||||
@@ -79,28 +79,28 @@ type ExternalNetworkPortRequest struct {
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// IPv4
|
||||
// Required: false
|
||||
IPv4 string `url:"ipv4,omitempty" json:"ipv4,omitempty"`
|
||||
// Required: true
|
||||
IPv4 string `url:"ipv4" json:"ipv4" validate:"required"`
|
||||
|
||||
// IPv6
|
||||
// Required: false
|
||||
IPv6 string `url:"ipv6,omitempty" json:"ipv6,omitempty"`
|
||||
// Required: true
|
||||
IPv6 string `url:"ipv6" json:"ipv6" validate:"required"`
|
||||
|
||||
// IPv6 Config
|
||||
// Required: false
|
||||
IPv6Config *IPv6ConfigRequest `url:"-" json:"ipv6_config,omitempty"`
|
||||
// Required: true
|
||||
IPv6Config *IPv6ConfigRequest `url:"-" json:"ipv6_config" validate:"required"`
|
||||
|
||||
// MAC address
|
||||
// Required: true
|
||||
MAC string `url:"mac" json:"mac" validate:"required"`
|
||||
|
||||
// Router gateway port
|
||||
// Required: false
|
||||
RouterGatewayPort *RouterGatewayPortRequest `url:"-" json:"router_gateway_port,omitempty"`
|
||||
// Required: true
|
||||
RouterGatewayPort *RouterGatewayPortRequest `url:"-" json:"router_gateway_port" validate:"required"`
|
||||
|
||||
// Floating IP
|
||||
// Required: false
|
||||
FloatingIP *FloatingIPRequest `url:"-" json:"floating_ip,omitempty"`
|
||||
// Required: true
|
||||
FloatingIP *FloatingIPRequest `url:"-" json:"floating_ip" validate:"required"`
|
||||
}
|
||||
|
||||
type IPv6ConfigRequest struct {
|
||||
@@ -167,15 +167,15 @@ type FloatingIPRequest struct {
|
||||
|
||||
// External network port
|
||||
// Required: true
|
||||
ExternalNetworkPort string `url:"external_network_port" json:"external_network_port" validate:"required"`
|
||||
ExternalNetworkPort *ExternalNetworkPortRequest `url:"-" json:"external_network_port" validate:"required"`
|
||||
|
||||
// ID of the Floating IP
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// Logical port
|
||||
// Required: false
|
||||
LogicalPort *LogicalPortRequest `url:"-" json:"logical_port,omitempty"`
|
||||
// Required: true
|
||||
LogicalPort *LogicalPortRequest `url:"-" json:"logical_port" validate:"required"`
|
||||
|
||||
// Router
|
||||
// Required: true
|
||||
@@ -185,6 +185,14 @@ type FloatingIPRequest struct {
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
|
||||
// ID of the user who created the floating IP
|
||||
// Required: false
|
||||
CreatedBy string `url:"created_by,omitempty" json:"created_by,omitempty"`
|
||||
|
||||
// ID of the user who last updated the floating IP
|
||||
// Required: false
|
||||
UpdatedBy string `url:"updated_by,omitempty" json:"updated_by,omitempty"`
|
||||
|
||||
// ID of version
|
||||
// Required: true
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
@@ -209,7 +217,7 @@ type LogicalPortRequest struct {
|
||||
|
||||
// Address detection
|
||||
// Required: true
|
||||
AddressDetection bool `url:"address_detection" json:"address_detection" validate:"required"`
|
||||
AddressDetection bool `url:"address_detection" json:"address_detection"`
|
||||
|
||||
// Description
|
||||
// Required: true
|
||||
@@ -219,14 +227,18 @@ type LogicalPortRequest struct {
|
||||
// Required: false
|
||||
CreatedAt time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
|
||||
|
||||
// User-friendly name for router
|
||||
// User-friendly name for logical port
|
||||
// Required: true
|
||||
RouterDisplayName string `url:"router_display_name" json:"router_display_name" validate:"required"`
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// Whether the logical pork is enabled
|
||||
// Required: true
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// Exclude firewall information
|
||||
// Required: true
|
||||
ExcludeFirewall *ExcludeFirewallRequest `url:"-" json:"exclude_firewall" validate:"required"`
|
||||
|
||||
// External Network ID
|
||||
// Required: false
|
||||
ExternalNetworkID string `url:"external_network_id,omitempty" json:"external_network_id,omitempty"`
|
||||
@@ -236,38 +248,66 @@ type LogicalPortRequest struct {
|
||||
Hypervisor string `url:"hypervisor" json:"hypervisor" validate:"required"`
|
||||
|
||||
// User-friendly name for hypervisor
|
||||
// Required: true
|
||||
HypervisorDisplayName string `url:"hypervisor_display_name" json:"hypervisor_display_name" validate:"required"`
|
||||
|
||||
// Labels
|
||||
// Required: false
|
||||
HypervisorDisplayName string `url:"hypervisor_display_name,omitempty" json:"hypervisor_display_name,omitempty"`
|
||||
Labels *LabelsRequest `url:"-" json:"labels,omitempty"`
|
||||
|
||||
// Live Migration Target Hv
|
||||
// Required: true
|
||||
LiveMigrationTargetHV string `url:"live_migration_target_hv" json:"live_migration_target_hv" validate:"required"`
|
||||
// Required: false
|
||||
LiveMigrationTargetHV string `url:"live_migration_target_hv,omitempty" json:"live_migration_target_hv,omitempty"`
|
||||
|
||||
// Status
|
||||
// Required: true
|
||||
Status *StatusRequest `url:"-" json:"status" validate:"required"`
|
||||
// Required: false
|
||||
Status *StatusRequest `url:"-" json:"status,omitempty"`
|
||||
|
||||
// Port bindings
|
||||
// Required: true
|
||||
Bindings *PortBindingsRequest `url:"-" json:"bindings" validate:"required"`
|
||||
// Required: false
|
||||
Bindings *PortBindingsRequest `url:"-" json:"bindings,omitempty"`
|
||||
|
||||
// Unique Identifier
|
||||
// Required: true
|
||||
UniqueIDentifier string `url:"unique_identifier" json:"unique_identifier" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
// Required: false
|
||||
UpdatedAt time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"`
|
||||
|
||||
// ID of version
|
||||
// Required: true
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
}
|
||||
|
||||
type StatusRequest struct {
|
||||
// Common
|
||||
type ExcludeFirewallRequest struct {
|
||||
// Exclusion reason
|
||||
// Required: false
|
||||
ExclusionReason string `url:"exclusion_reason,omitempty" json:"exclusion_reason,omitempty"`
|
||||
|
||||
// Whether logical port addresses are excluded from firewall
|
||||
// Required: false
|
||||
LogicalPortAddressesExcluded bool `url:"logical_port_addresses_excluded,omitempty" json:"logical_port_addresses_excluded,omitempty"`
|
||||
|
||||
// Whether logical port is excluded from firewall
|
||||
// Required: true
|
||||
Common string `url:"common" json:"common" validate:"required"`
|
||||
LogicalPortExcluded bool `url:"logical_port_excluded" json:"logical_port_excluded"`
|
||||
}
|
||||
|
||||
type LabelsRequest struct {
|
||||
// VM ID
|
||||
// Required: true
|
||||
VMID string `url:"vm_id" json:"vm_id" validate:"required"`
|
||||
|
||||
// VM name
|
||||
// Required: false
|
||||
VMName string `url:"vm_name,omitempty" json:"vm_name,omitempty"`
|
||||
}
|
||||
|
||||
type StatusRequest struct {
|
||||
// Operation status
|
||||
// Required: true
|
||||
OperationStatus string `url:"operation_status" json:"operation_status" validate:"required"`
|
||||
|
||||
// Hypervisors status
|
||||
// Required: false
|
||||
@@ -280,24 +320,20 @@ type PortBindingsRequest struct {
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// User-friendly name for segment
|
||||
// Required: true
|
||||
SegmentDisplayName string `url:"segment_display_name" json:"segment_display_name" validate:"required"`
|
||||
// Required: false
|
||||
SegmentDisplayName string `url:"segment_display_name,omitempty" json:"segment_display_name,omitempty"`
|
||||
|
||||
// Segment ID
|
||||
// Required: true
|
||||
SegmentID string `url:"segment_id" json:"segment_id" validate:"required"`
|
||||
// Required: false
|
||||
SegmentID string `url:"segment_id,omitempty" json:"segment_id,omitempty"`
|
||||
|
||||
// Port security
|
||||
// Required: true
|
||||
PortSecurity bool `url:"port_security" json:"port_security" validate:"required"`
|
||||
PortSecurity bool `url:"port_security" json:"port_security"`
|
||||
|
||||
// Address detection
|
||||
// Required: true
|
||||
AddressDetection bool `url:"address_detection" json:"address_detection" validate:"required"`
|
||||
|
||||
// Is Exclude From Firewall
|
||||
// Required: true
|
||||
IsExcludedFromFirewall bool `url:"is_excluded_from_firewall" json:"is_excluded_from_firewall" validate:"required"`
|
||||
AddressDetection bool `url:"address_detection" json:"address_detection"`
|
||||
|
||||
// ID of version
|
||||
// Required: true
|
||||
@@ -312,14 +348,14 @@ type PortBindingsRequest struct {
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
|
||||
// Logical port addresses
|
||||
// Required: true
|
||||
LogicalPortAddresses []LogicalPortAddressRequest `url:"-" json:"logical_port_addresses" validate:"required"`
|
||||
// Required: false
|
||||
LogicalPortAddresses []LogicalPortAddressRequest `url:"-" json:"logical_port_addresses,omitempty"`
|
||||
}
|
||||
|
||||
type HypervisorStatusRequest struct {
|
||||
// Status
|
||||
// Operation status
|
||||
// Required: true
|
||||
Status string `url:"status" json:"status" validate:"required"`
|
||||
OperationStatus string `url:"operation_status" json:"operation_status" validate:"required"`
|
||||
|
||||
// Name of hypervisor
|
||||
// Required: true
|
||||
@@ -351,13 +387,13 @@ type LogicalPortAddressRequest struct {
|
||||
// Required: false
|
||||
IsDiscovered bool `url:"is_discovered,omitempty" json:"is_discovered,omitempty"`
|
||||
|
||||
// Is discovered
|
||||
// Required: true
|
||||
IsPrimary bool `url:"is_primary" json:"is_primary" validate:"required"`
|
||||
// Is primary
|
||||
// Required: false
|
||||
IsPrimary bool `url:"is_primary,omitempty" json:"is_primary,omitempty"`
|
||||
|
||||
// MAC
|
||||
// Required: false
|
||||
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
|
||||
// Required: true
|
||||
MAC string `url:"mac" json:"mac" validate:"required"`
|
||||
|
||||
// ID
|
||||
// Required: true
|
||||
@@ -368,62 +404,62 @@ type LogicalPortAddressRequest struct {
|
||||
LogicalPortID string `url:"logical_port_id" json:"logical_port_id" validate:"required"`
|
||||
|
||||
// Assigned at
|
||||
// Required: false
|
||||
AssignedAt time.Time `url:"assigned_at,omitempty" json:"assigned_at,omitempty"`
|
||||
// Required: true
|
||||
AssignedAt time.Time `url:"assigned_at" json:"assigned_at" validate:"required"`
|
||||
}
|
||||
|
||||
type RouterRequest struct {
|
||||
// Access group ID
|
||||
// Required: false
|
||||
AccessGroupID string `url:"access_group_id,omitempty" json:"access_group_id,omitempty"`
|
||||
// Required: true
|
||||
AccessGroupID string `url:"access_group_id" json:"access_group_id" validate:"required"`
|
||||
|
||||
// Access group name
|
||||
// Required: false
|
||||
AccessGroupName string `url:"access_group_name,omitempty" json:"access_group_name,omitempty"`
|
||||
// Required: true
|
||||
AccessGroupName string `url:"access_group_name" json:"access_group_name" validate:"required"`
|
||||
|
||||
// Created at
|
||||
// Required: false
|
||||
CreatedAt time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
|
||||
// Required: true
|
||||
CreatedAt time.Time `url:"created_at" json:"created_at" validate:"required"`
|
||||
|
||||
// Detailed description of the router
|
||||
// Required: false
|
||||
Description string `url:"description,omitempty" json:"description,omitempty"`
|
||||
// Required: true
|
||||
Description string `url:"description" json:"description" validate:"required"`
|
||||
|
||||
// User-friendly name for the router
|
||||
// Required: true
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// Whether the router is enabled
|
||||
// Required: false
|
||||
Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"`
|
||||
// Required: true
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// Gateway ports
|
||||
// Required: false
|
||||
GatewayPorts []GatewayPortRequest `url:"-" json:"gateway_ports,omitempty"`
|
||||
// Required: true
|
||||
GatewayPorts []GatewayPortRequest `url:"-" json:"gateway_ports" validate:"required"`
|
||||
|
||||
// ID
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// Policies
|
||||
// Required: false
|
||||
Policies []RouterPolicyRequest `url:"-" json:"policies,omitempty"`
|
||||
// Required: true
|
||||
Policies []RouterPolicyRequest `url:"-" json:"policies" validate:"required"`
|
||||
|
||||
// Ports
|
||||
// Required: false
|
||||
Ports []RouterPortRequest `url:"-" json:"ports,omitempty"`
|
||||
// Required: true
|
||||
Ports []RouterPortRequest `url:"-" json:"ports" validate:"required"`
|
||||
|
||||
// Status
|
||||
// Required: false
|
||||
Status *StatusRequest `url:"-" json:"status,omitempty"`
|
||||
// Required: true
|
||||
Status *StatusRequest `url:"-" json:"status" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: false
|
||||
UpdatedAt time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"`
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
|
||||
// ID of version
|
||||
// Required: false
|
||||
VersionID uint64 `url:"version_id,omitempty" json:"version_id,omitempty"`
|
||||
// Required: true
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
}
|
||||
|
||||
type GatewayPortRequest struct {
|
||||
@@ -436,28 +472,28 @@ type GatewayPortRequest struct {
|
||||
Description string `url:"description" json:"description" validate:"required"`
|
||||
|
||||
// L4 port max
|
||||
// Required: false
|
||||
ExternalL4PortMax int64 `url:"external_l4_port_max,omitempty" json:"external_l4_port_max,omitempty"`
|
||||
// Required: true
|
||||
ExternalL4PortMax int64 `url:"external_l4_port_max" json:"external_l4_port_max" validate:"required"`
|
||||
|
||||
// L4 port min
|
||||
// Required: false
|
||||
ExternalL4PortMin int64 `url:"external_l4_port_min,omitempty" json:"external_l4_port_min,omitempty"`
|
||||
// Required: true
|
||||
ExternalL4PortMin int64 `url:"external_l4_port_min" json:"external_l4_port_min" validate:"required"`
|
||||
|
||||
// External network port
|
||||
// Required: true
|
||||
ExternalNetworkPort interface{} `url:"external_network_port" json:"external_network_port" validate:"required"`
|
||||
ExternalNetworkPort *ExternalNetworkPortRequest `url:"-" json:"external_network_port" validate:"required"`
|
||||
|
||||
// ID of port
|
||||
// Required: false
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// SNAT Enabled
|
||||
// Required: true
|
||||
SNATEnabled bool `url:"snat_enabled" json:"snat_enabled"`
|
||||
|
||||
// Status
|
||||
// Required: false
|
||||
Status *StatusRequest `url:"-" json:"status,omitempty"`
|
||||
// Required: true
|
||||
Status *StatusRequest `url:"-" json:"status" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
@@ -482,12 +518,12 @@ type RouterPolicyRequest struct {
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// Whether the policy is enabled
|
||||
// Required: false
|
||||
Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"`
|
||||
// Required: true
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// ID of port
|
||||
// Required: false
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// Match
|
||||
// Required: true
|
||||
@@ -528,16 +564,16 @@ type RouterPortRequest struct {
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// ID of port
|
||||
// Required: false
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
|
||||
// Next IPv4 address
|
||||
// Required: true
|
||||
NextIPv4Address []string `url:"next_ipv4_address" json:"next_ipv4_address" validate:"required"`
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// Next IPv6 address
|
||||
// IPv4 address
|
||||
// Required: true
|
||||
NextIPv6Address []string `url:"next_ipv6_address" json:"next_ipv6_address" validate:"required"`
|
||||
IPv4Address string `url:"ipv4_address" json:"ipv4_address" validate:"required"`
|
||||
|
||||
// IPv6 address
|
||||
// Required: true
|
||||
IPv6Address string `url:"ipv6_address" json:"ipv6_address" validate:"required"`
|
||||
|
||||
// IPv6 Config
|
||||
// Required: true
|
||||
@@ -556,8 +592,8 @@ type RouterPortRequest struct {
|
||||
SegmentID string `url:"segment_id" json:"segment_id" validate:"required"`
|
||||
|
||||
// Status
|
||||
// Required: false
|
||||
Status *StatusRequest `url:"-" json:"status,omitempty"`
|
||||
// Required: true
|
||||
Status *StatusRequest `url:"-" json:"status" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
@@ -598,12 +634,16 @@ type SegmentRequest struct {
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// Whether the segment is enabled
|
||||
// Required: false
|
||||
Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"`
|
||||
// Required: true
|
||||
Enabled bool `url:"enabled" json:"enabled"`
|
||||
|
||||
// ID of segment
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// L2 connection port
|
||||
// Required: false
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
L2ConnectionPort *L2ConnectionPortRequest `url:"-" json:"l2_connection_port,omitempty"`
|
||||
|
||||
// Logical ports info
|
||||
// Required: false
|
||||
@@ -625,6 +665,10 @@ type SegmentRequest struct {
|
||||
// Required: false
|
||||
SubnetV6 string `url:"subnet_v6,omitempty" json:"subnet_v6,omitempty"`
|
||||
|
||||
// Type of segment
|
||||
// Required: true
|
||||
Type string `url:"type" json:"type" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
@@ -634,6 +678,86 @@ type SegmentRequest struct {
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
}
|
||||
|
||||
type L2ConnectionPortRequest struct {
|
||||
// Access group ID
|
||||
// Required: true
|
||||
AccessGroupID string `url:"access_group_id" json:"access_group_id" validate:"required"`
|
||||
|
||||
// Created at
|
||||
// Required: true
|
||||
CreatedAt time.Time `url:"created_at" json:"created_at" validate:"required"`
|
||||
|
||||
// ID of the L2 connection port
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// L2 external network details
|
||||
// Required: false
|
||||
L2ExternalNetwork *L2ExternalNetworkRequest `url:"-" json:"l2_external_network,omitempty"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
|
||||
// ID of the user who last updated the port
|
||||
// Required: false
|
||||
UpdatedBy string `url:"updated_by,omitempty" json:"updated_by,omitempty"`
|
||||
|
||||
// ID of the user who created the port
|
||||
// Required: false
|
||||
CreatedBy string `url:"created_by,omitempty" json:"created_by,omitempty"`
|
||||
|
||||
// ID of version
|
||||
// Required: true
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
}
|
||||
|
||||
type L2ExternalNetworkRequest struct {
|
||||
// Bridge network name
|
||||
// Required: true
|
||||
BridgeNetworkName string `url:"bridge_network_name" json:"bridge_network_name" validate:"required"`
|
||||
|
||||
// Created at
|
||||
// Required: true
|
||||
CreatedAt time.Time `url:"created_at" json:"created_at" validate:"required"`
|
||||
|
||||
// Detailed description of the network
|
||||
// Required: true
|
||||
Description string `url:"description" json:"description" validate:"required"`
|
||||
|
||||
// User-friendly name for the network
|
||||
// Required: true
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// List of hypervisor IDs attached to the network
|
||||
// Required: true
|
||||
Hypervisors []string `url:"hypervisors" json:"hypervisors" validate:"required"`
|
||||
|
||||
// ID of the network
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
|
||||
// Updated at
|
||||
// Required: true
|
||||
UpdatedAt time.Time `url:"updated_at" json:"updated_at" validate:"required"`
|
||||
|
||||
// ID of version
|
||||
// Required: true
|
||||
VersionID uint64 `url:"version_id" json:"version_id" validate:"required"`
|
||||
|
||||
// VLAN tag
|
||||
// Required: false
|
||||
VLANTag uint64 `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty"`
|
||||
|
||||
// ID of the user who last updated the network
|
||||
// Required: false
|
||||
UpdatedBy string `url:"updated_by,omitempty" json:"updated_by,omitempty"`
|
||||
|
||||
// ID of the user who created the network
|
||||
// Required: false
|
||||
CreatedBy string `url:"created_by,omitempty" json:"created_by,omitempty"`
|
||||
}
|
||||
|
||||
type DHCPv4ConfigRequest struct {
|
||||
// DNS
|
||||
// Required: false
|
||||
@@ -682,12 +806,12 @@ type DHCPv6ConfigRequest struct {
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
|
||||
// Lease time
|
||||
// Required: true
|
||||
LeaseTime int64 `url:"lease_time" json:"lease_time" validate:"required"`
|
||||
// Required: false
|
||||
LeaseTime int64 `url:"lease_time,omitempty" json:"lease_time,omitempty"`
|
||||
|
||||
// Server MAC
|
||||
// Required: true
|
||||
ServerMAC string `url:"server_mac" json:"server_mac" validate:"required"`
|
||||
// Required: false
|
||||
ServerMAC string `url:"server_mac,omitempty" json:"server_mac,omitempty"`
|
||||
|
||||
// Whether the config is enabled
|
||||
// Required: true
|
||||
@@ -700,8 +824,8 @@ type EntityInfoRequest struct {
|
||||
DisplayName string `url:"display_name" json:"display_name" validate:"required"`
|
||||
|
||||
// ID of entity
|
||||
// Required: false
|
||||
ID string `url:"id,omitempty" json:"id,omitempty"`
|
||||
// Required: true
|
||||
ID string `url:"id" json:"id" validate:"required"`
|
||||
}
|
||||
|
||||
// Create creates extnet
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
// GetRequest struct to get information about external network
|
||||
type GetRequest struct {
|
||||
// ID of external network
|
||||
// Required: false
|
||||
// Required: true
|
||||
ExtNetID string `url:"external_network_id" json:"external_network_id" validate:"required"`
|
||||
|
||||
// ID of access group
|
||||
|
||||
@@ -36,7 +36,7 @@ type ListRequest struct {
|
||||
|
||||
// Filter by VLAN tag
|
||||
// Required: false
|
||||
VLANTag string `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty"`
|
||||
VLANTag uint64 `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty" validate:"omitempty,min=1,max=4094"`
|
||||
|
||||
// Filter by IPv4 default gateway
|
||||
// Required: false
|
||||
|
||||
+118
-9
@@ -82,6 +82,15 @@ type ExternalNetworkPort struct {
|
||||
|
||||
// Floating IP
|
||||
FloatingIP FloatingIP `json:"floating_ip"`
|
||||
|
||||
// ID of external network
|
||||
ExternalNetworkID string `json:"external_network_id"`
|
||||
|
||||
// ID of external network port
|
||||
ID string `json:"id"`
|
||||
|
||||
// ID of version
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
type IPv6Config struct {
|
||||
@@ -132,7 +141,7 @@ type FloatingIP struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
// External network port
|
||||
ExternalNetworkPort string `json:"external_network_port"`
|
||||
ExternalNetworkPort *ExternalNetworkPort `json:"external_network_port"`
|
||||
|
||||
// ID of floating IP
|
||||
ID string `json:"id"`
|
||||
@@ -146,6 +155,12 @@ type FloatingIP struct {
|
||||
// Update time
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
// ID of the user who created the floating IP
|
||||
CreatedBy string `json:"created_by"`
|
||||
|
||||
// ID of the user who last updated the floating IP
|
||||
UpdatedBy string `json:"updated_by"`
|
||||
|
||||
// ID of version
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
@@ -178,6 +193,9 @@ type LogicalPort struct {
|
||||
// Whether the logical port is enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Exclude firewall information
|
||||
ExcludeFirewall ExcludeFirewall `json:"exclude_firewall"`
|
||||
|
||||
// External Network ID
|
||||
ExternalNetworkID string `json:"external_network_id"`
|
||||
|
||||
@@ -187,6 +205,9 @@ type LogicalPort struct {
|
||||
// User-friendly name for hypervisor
|
||||
HypervisorDisplayName string `json:"hypervisor_display_name"`
|
||||
|
||||
// Labels
|
||||
Labels Labels `json:"labels"`
|
||||
|
||||
// Live Migration Target Hv
|
||||
LiveMigrationTargetHV string `json:"live_migration_target_hv"`
|
||||
|
||||
@@ -206,6 +227,25 @@ type LogicalPort struct {
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
type Labels struct {
|
||||
// VM ID
|
||||
VMID string `json:"vm_id"`
|
||||
|
||||
// VM name
|
||||
VMName string `json:"vm_name"`
|
||||
}
|
||||
|
||||
type PortBindings struct {
|
||||
// Binding ID
|
||||
ID string `json:"id"`
|
||||
@@ -222,9 +262,6 @@ type PortBindings struct {
|
||||
// Address detection
|
||||
AddressDetection bool `json:"address_detection"`
|
||||
|
||||
// Is Exclude From Firewall
|
||||
IsExcludedFromFirewall bool `json:"is_excluded_from_firewall"`
|
||||
|
||||
// ID of version
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
@@ -319,7 +356,7 @@ type GatewayPort struct {
|
||||
ExternalL4PortMin int64 `json:"external_l4_port_min"`
|
||||
|
||||
// External network port
|
||||
ExternalNetworkPort interface{} `json:"external_network_port"`
|
||||
ExternalNetworkPort *ExternalNetworkPort `json:"external_network_port"`
|
||||
|
||||
// ID of port
|
||||
ID string `json:"id"`
|
||||
@@ -441,6 +478,9 @@ type Segment struct {
|
||||
// ID of segment
|
||||
ID string `json:"id"`
|
||||
|
||||
// L2 connection port info
|
||||
L2ConnectionPort *L2ConnectionPort `json:"l2_connection_port,omitempty"`
|
||||
|
||||
// Logical ports info
|
||||
LogicalPortsInfo []EntityInfo `json:"logical_ports_info"`
|
||||
|
||||
@@ -456,6 +496,9 @@ type Segment struct {
|
||||
// IPv6 subnet in CIDR notation
|
||||
SubnetV6 string `json:"subnet_v6"`
|
||||
|
||||
// Type of segment
|
||||
Type string `json:"type"`
|
||||
|
||||
// Update time
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
@@ -463,6 +506,69 @@ type Segment struct {
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// L2ConnectionPort holds information about the L2 connection port of a segment
|
||||
type L2ConnectionPort struct {
|
||||
// ID of the L2 connection port
|
||||
ID string `json:"id"`
|
||||
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// ID of version
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// L2 external network details
|
||||
L2ExternalNetwork L2ExternalNetwork `json:"l2_external_network"`
|
||||
|
||||
// Created time
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
// ID of the user who created the port
|
||||
CreatedBy string `json:"created_by"`
|
||||
|
||||
// Updated time
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
// ID of the user who last updated the port
|
||||
UpdatedBy string `json:"updated_by"`
|
||||
}
|
||||
|
||||
// L2ExternalNetwork holds information about an L2 external network
|
||||
type L2ExternalNetwork struct {
|
||||
// ID of the network
|
||||
ID string `json:"id"`
|
||||
|
||||
// User-friendly name for the network
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Detailed description of the network
|
||||
Description string `json:"description"`
|
||||
|
||||
// Bridge network name
|
||||
BridgeNetworkName string `json:"bridge_network_name"`
|
||||
|
||||
// List of hypervisor IDs attached to the network
|
||||
Hypervisors []string `json:"hypervisors"`
|
||||
|
||||
// VLAN tag
|
||||
VLANTag uint64 `json:"vlan_tag"`
|
||||
|
||||
// ID of version
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// Created time
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
// ID of the user who created the network
|
||||
CreatedBy string `json:"created_by"`
|
||||
|
||||
// Updated time
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
// ID of the user who last updated the network
|
||||
UpdatedBy string `json:"updated_by"`
|
||||
}
|
||||
|
||||
type DHCPv4Config struct {
|
||||
// DNS
|
||||
DNS []string `json:"dns"`
|
||||
@@ -518,16 +624,19 @@ type EntityInfo struct {
|
||||
}
|
||||
|
||||
type Status struct {
|
||||
// Common
|
||||
Common string `json:"common"`
|
||||
// Operation status
|
||||
OperationStatus string `json:"operation_status"`
|
||||
|
||||
// Hypervisors status
|
||||
Hypervisors []HypervisorStatus `json:"hypervisors"`
|
||||
|
||||
// Hypervisor status
|
||||
HypervisorStatus string `json:"hypervisor_status"`
|
||||
}
|
||||
|
||||
type HypervisorStatus struct {
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
// Operation status
|
||||
OperationStatus string `json:"operation_status"`
|
||||
|
||||
// Name of hypervisor
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -61,7 +61,7 @@ type UpdateRequest struct {
|
||||
|
||||
// VLAN tag identifier
|
||||
// Required: false
|
||||
VLANTag string `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty" validate:"omitempty,trunkTags"`
|
||||
VLANTag uint64 `url:"vlan_tag,omitempty" json:"vlan_tag,omitempty" validate:"omitempty,min=1,max=4094"`
|
||||
}
|
||||
|
||||
// Update updated an external network
|
||||
|
||||
Reference in new issue
Block a user