v1.14.8
This commit is contained in:
@@ -19,6 +19,9 @@ type RecordNetObjGroup struct {
|
||||
// Access group name
|
||||
AccessGroupName string `json:"access_group_name"`
|
||||
|
||||
// Addresses
|
||||
Addresses NetAddresses `json:"addresses"`
|
||||
|
||||
// Counters
|
||||
Counters Counter `json:"counters"`
|
||||
|
||||
@@ -37,21 +40,36 @@ type RecordNetObjGroup struct {
|
||||
// ID of a network object group
|
||||
ID string `json:"id"`
|
||||
|
||||
// L2 connection ports attached to a network object group
|
||||
L2ConnectionPorts L2ConnectionPorts `json:"l2_connection_ports"`
|
||||
|
||||
// Logical ports attached to a network object group
|
||||
LogicalPorts LogicalPorts `json:"logical_ports"`
|
||||
|
||||
// Name of a network object group
|
||||
Name string `json:"name"`
|
||||
|
||||
// Purpose of a network object group
|
||||
Purpose string `json:"purpose"`
|
||||
|
||||
// Security policies of a network object group
|
||||
SecurityPolicies SecurityPolicies `json:"security_policies"`
|
||||
|
||||
// Type of a network object group
|
||||
Type string `json:"type"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// Info about counters
|
||||
type Counter struct {
|
||||
// Amount of addresses
|
||||
AddressesCount uint64 `json:"addresses_count"`
|
||||
|
||||
// Amount of L2 connection ports
|
||||
L2ConnectionPortsCount uint64 `json:"l2_connection_ports_count"`
|
||||
|
||||
// Amount of logical ports
|
||||
LogicalPortsCount uint64 `json:"logical_ports_count"`
|
||||
|
||||
@@ -62,23 +80,133 @@ type Counter struct {
|
||||
SecurityRulesCount uint64 `json:"security_rules_count"`
|
||||
}
|
||||
|
||||
// List of counters
|
||||
type Counters []Counter
|
||||
// Info about a net address
|
||||
type NetAddress struct {
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Info about an external network port
|
||||
type ExternalNetworkPort struct {
|
||||
// IP address
|
||||
IPAddr string `json:"ip_addr"`
|
||||
|
||||
// IP address range end
|
||||
IPAddrRangeEnd string `json:"ip_addr_range_end"`
|
||||
|
||||
// IP prefix
|
||||
IPPrefix string `json:"ip_prefix"`
|
||||
|
||||
// MAC address
|
||||
MACAddr string `json:"mac_addr"`
|
||||
|
||||
// Net address type
|
||||
NetAddressType string `json:"net_address_type"`
|
||||
}
|
||||
|
||||
// List of net addresses
|
||||
type NetAddresses []NetAddress
|
||||
|
||||
// Request info about a net address
|
||||
type NetAddressRequest struct {
|
||||
// IP address
|
||||
// Required: false
|
||||
IPAddr string `url:"ip_addr" json:"ip_addr"`
|
||||
|
||||
// IP address range end
|
||||
// Required: false
|
||||
IPAddrRangeEnd string `url:"ip_addr_range_end" json:"ip_addr_range_end"`
|
||||
|
||||
// IP prefix
|
||||
// Required: false
|
||||
IPPrefix string `url:"ip_prefix" json:"ip_prefix"`
|
||||
|
||||
// MAC address
|
||||
// Required: false
|
||||
MACAddr string `url:"mac_addr" json:"mac_addr"`
|
||||
|
||||
// Net address type
|
||||
// Required: true
|
||||
NetAddressType string `url:"net_address_type" json:"net_address_type" validate:"required"`
|
||||
}
|
||||
|
||||
// Info about an L2 connection port
|
||||
type L2ConnectionPort struct {
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Created at
|
||||
CreatedAt string `json:"created_at"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// L2 external network
|
||||
L2ExternalNetwork L2ExternalNetwork `json:"l2_external_network"`
|
||||
|
||||
// Updated at
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// List of L2 connection ports
|
||||
type L2ConnectionPorts []L2ConnectionPort
|
||||
|
||||
// Info about an L2 external network
|
||||
type L2ExternalNetwork struct {
|
||||
// Bridge network name
|
||||
BridgeNetworkName string `json:"bridge_network_name"`
|
||||
|
||||
// Default gateaway for IPv4
|
||||
DefaultGateawayIPv4 string `json:"default_gateaway_ipv4"`
|
||||
|
||||
// Default gateaway for IPv6
|
||||
DefaultGateawayIPv6 string `json:"default_gateaway_ipv6"`
|
||||
// Created at
|
||||
CreatedAt string `json:"created_at"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Hypervisors
|
||||
Hypervisors []string `json:"hypervisors"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Updated at
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// VLAN Tag
|
||||
VLANTag *int `json:"vlan_tag"`
|
||||
}
|
||||
|
||||
// Info about an external network port
|
||||
type ExternalNetworkPort struct {
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Access group name
|
||||
AccessGroupName string `json:"access_group_name"`
|
||||
|
||||
// Bridge network name
|
||||
BridgeNetworkName string `json:"bridge_network_name"`
|
||||
|
||||
// Comment
|
||||
Comment string `json:"comment"`
|
||||
|
||||
// Default gateway for IPv4
|
||||
DefaultGatewayIPv4 string `json:"default_gateway_ipv4"`
|
||||
|
||||
// Default gateway for IPv6
|
||||
DefaultGatewayIPv6 string `json:"default_gateway_ipv6"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Is a logical port enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Details of external network ports
|
||||
ExternalNetworkPorts ExternalNetworkPortsField `json:"external_network_ports"`
|
||||
|
||||
@@ -88,11 +216,14 @@ type ExternalNetworkPort struct {
|
||||
// ID of an external network port
|
||||
ID string `json:"id"`
|
||||
|
||||
// IP v4
|
||||
IPv4 string `json:"ipv4"`
|
||||
|
||||
// Status
|
||||
Status Status `json:"status"`
|
||||
|
||||
// Version ID
|
||||
VersionID string `json:"version_id"`
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// Subnet for V4
|
||||
SubnetV4 string `json:"subnet_v4"`
|
||||
@@ -107,7 +238,10 @@ type ExternalNetworkPort struct {
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// VLAN Tag
|
||||
VLANTag string `json:"vlan_tag"`
|
||||
VLANTag int `json:"vlan_tag"`
|
||||
|
||||
// MAC
|
||||
MAC string `json:"mac"`
|
||||
}
|
||||
|
||||
// List of external network ports
|
||||
@@ -142,6 +276,9 @@ type LogicalPort struct {
|
||||
// Is a logical port enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Exclude firewall settings
|
||||
ExcludeFirewall ExcludeFirewall `json:"exclude_firewall"`
|
||||
|
||||
// External network ID
|
||||
ExternalNetworkID string `json:"external_network_id"`
|
||||
|
||||
@@ -151,6 +288,9 @@ type LogicalPort struct {
|
||||
// Hypervisor display name
|
||||
HypervisorDisplayName string `json:"hypervisor_display_name"`
|
||||
|
||||
// Labels
|
||||
Labels Labels `json:"labels"`
|
||||
|
||||
// Live migration target HV
|
||||
LiveMigrationTargetHV string `json:"live_migration_target_hv"`
|
||||
|
||||
@@ -170,9 +310,30 @@ type LogicalPort struct {
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// List a logical ports
|
||||
// List of logical ports
|
||||
type LogicalPorts []LogicalPort
|
||||
|
||||
// Info about exclude firewall settings
|
||||
type ExcludeFirewall struct {
|
||||
// Exclusion reason
|
||||
ExclusionReason string `json:"exclusion_reason"`
|
||||
|
||||
// Is logical port addresses excluded
|
||||
LogicalPortAddressesExcluded bool `json:"logical_port_addresses_excluded"`
|
||||
|
||||
// Is logical port excluded
|
||||
LogicalPortExcluded bool `json:"logical_port_excluded"`
|
||||
}
|
||||
|
||||
// Labels for a logical port
|
||||
type Labels struct {
|
||||
// VM ID
|
||||
VMID string `json:"vm_id"`
|
||||
|
||||
// VM name
|
||||
VMName string `json:"vm_name"`
|
||||
}
|
||||
|
||||
// Info about a security policy
|
||||
type SecurityPolicy struct {
|
||||
// Access group ID
|
||||
@@ -181,8 +342,8 @@ type SecurityPolicy struct {
|
||||
// Access group name
|
||||
AccessGroupName string `json:"access_group_name"`
|
||||
|
||||
// Applied to net object group ID
|
||||
AppliedToNetObjectGroupID string `json:"applied_to_net_object_group_id"`
|
||||
// Applied net object groups
|
||||
AppliedNetObjectGroups AppliedNetObjectGroups `json:"applied_net_object_groups"`
|
||||
|
||||
// Created at
|
||||
CreatedAt string `json:"created_at"`
|
||||
@@ -211,6 +372,9 @@ type SecurityPolicy struct {
|
||||
// Status
|
||||
Status Status `json:"status"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
@@ -221,6 +385,21 @@ type SecurityPolicy struct {
|
||||
// List of security policies
|
||||
type SecurityPolicies []SecurityPolicy
|
||||
|
||||
// Info about an applied net object group in a security policy
|
||||
type AppliedNetObjectGroup struct {
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// List of applied net object groups
|
||||
type AppliedNetObjectGroups []AppliedNetObjectGroup
|
||||
|
||||
// Details of external network ports field
|
||||
type ExternalNetworkPortField struct {
|
||||
// Access group ID
|
||||
@@ -261,11 +440,14 @@ type ExternalNetworkPortsField []ExternalNetworkPortField
|
||||
|
||||
// Info about a status
|
||||
type Status struct {
|
||||
// Common
|
||||
Common string `json:"common"`
|
||||
// Operation status
|
||||
OperationStatus string `json:"operation_status"`
|
||||
|
||||
// Info about hypervisors
|
||||
Hypervisors HypervisorsInfo `json:"hypervisors"`
|
||||
|
||||
// Hypervisor status
|
||||
HypervisorStatus string `json:"hypervisor_status"`
|
||||
}
|
||||
|
||||
// Config for IP v6
|
||||
@@ -396,9 +578,6 @@ type Bindings struct {
|
||||
// Is an address detected
|
||||
AddressDetection bool `json:"address_detection"`
|
||||
|
||||
// Is excluded from firewall
|
||||
IsExcludedFromFirewall bool `json:"is_excluded_from_firewall"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
@@ -648,8 +827,8 @@ type RoutersInfo struct {
|
||||
|
||||
// Info about a hypervisor
|
||||
type HypervisorInfo struct {
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
// Operation status
|
||||
OperationStatus string `json:"operation_status"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
@@ -696,7 +875,128 @@ type LogicalPortAddress struct {
|
||||
// List of logical port addresses
|
||||
type LogicalPortAddresses []LogicalPortAddress
|
||||
|
||||
// TODO
|
||||
type SecurityRule struct{}
|
||||
// Info about a security rule
|
||||
type SecurityRule struct {
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Action
|
||||
Action string `json:"action"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Destination net object
|
||||
DestinationNetObject *SecurityRuleNetObject `json:"destination_net_object"`
|
||||
|
||||
// Direction
|
||||
Direction string `json:"direction"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Is enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Filter
|
||||
Filter *SecurityRuleFilter `json:"filter"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Is log enabled
|
||||
LogEnabled bool `json:"log_enabled"`
|
||||
|
||||
// Log name
|
||||
LogName string `json:"log_name"`
|
||||
|
||||
// Log severity
|
||||
LogSeverity string `json:"log_severity"`
|
||||
|
||||
// Priority
|
||||
Priority int `json:"priority"`
|
||||
|
||||
// Security policy ID
|
||||
SecurityPolicyID string `json:"security_policy_id"`
|
||||
|
||||
// Source net object
|
||||
SourceNetObject *SecurityRuleNetObject `json:"source_net_object"`
|
||||
|
||||
// Is statistics enabled
|
||||
StatisticsEnabled bool `json:"statistics_enabled"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// List of security rules
|
||||
type SecurityRules []SecurityRule
|
||||
|
||||
// Info about a security rule net object
|
||||
type SecurityRuleNetObject struct {
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Net address pool ID
|
||||
NetAddressPoolID string `json:"net_address_pool_id"`
|
||||
|
||||
// Net object group ID
|
||||
NetObjectGroupID string `json:"net_object_group_id"`
|
||||
}
|
||||
|
||||
// Info about a security rule filter
|
||||
type SecurityRuleFilter struct {
|
||||
// Filters
|
||||
Filters SecurityRuleFilters `json:"filters"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// Security rule filters
|
||||
type SecurityRuleFilters struct {
|
||||
// Filter all traffic
|
||||
All bool `json:"all"`
|
||||
|
||||
// Filter ARP traffic
|
||||
ARP bool `json:"arp"`
|
||||
|
||||
// Filter DHCP traffic
|
||||
DHCP bool `json:"dhcp"`
|
||||
|
||||
// Custom filter expression
|
||||
Expression string `json:"expression"`
|
||||
|
||||
// Filter ICMP traffic
|
||||
ICMP bool `json:"icmp"`
|
||||
|
||||
// Filter IP traffic
|
||||
IP bool `json:"ip"`
|
||||
|
||||
// Filter IPv4 traffic
|
||||
IPv4 bool `json:"ip_v4"`
|
||||
|
||||
// Filter IPv6 traffic
|
||||
IPv6 bool `json:"ip_v6"`
|
||||
|
||||
// Keep tracking opened sessions
|
||||
KeepOpenedSessions bool `json:"keep_opened_sessions"`
|
||||
|
||||
// Filter Neighbor Discovery traffic
|
||||
ND bool `json:"nd"`
|
||||
|
||||
// Filter TCP traffic
|
||||
TCP bool `json:"tcp"`
|
||||
|
||||
// List of TCP destination ports to filter
|
||||
TCPDstPorts []string `json:"tcp_dst_ports"`
|
||||
|
||||
// Filter UDP traffic
|
||||
UDP bool `json:"udp"`
|
||||
|
||||
// List of UDP destination ports to filter
|
||||
UDPDstPorts []string `json:"udp_dst_ports"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user