feat: add network_ids support to FirewallZonePolicyDestination
- Add NetworkIDs and MatchOppositeNetworks fields to destination struct - Add NETWORK to MatchingTarget validation for destination - Update codegen schema to include destination network targeting - Add AggregateNumPorts to DevicePortOverrides (compatibility fix) This enables firewall zone policies to target specific destination networks, matching the existing source.network_ids functionality. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,10 @@
|
|||||||
"ip_group_id": "",
|
"ip_group_id": "",
|
||||||
"ips": ["^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$"],
|
"ips": ["^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$"],
|
||||||
"match_opposite_ips": "true|false",
|
"match_opposite_ips": "true|false",
|
||||||
|
"match_opposite_networks": "true|false",
|
||||||
"match_opposite_ports": "true|false",
|
"match_opposite_ports": "true|false",
|
||||||
"matching_target": "ANY|APP|APP_CATEGORY|IP|REGION|WEB",
|
"matching_target": "ANY|APP|APP_CATEGORY|IP|NETWORK|REGION|WEB",
|
||||||
|
"network_ids": [""],
|
||||||
"matching_target_type": "ANY|OBJECT|SPECIFIC",
|
"matching_target_type": "ANY|OBJECT|SPECIFIC",
|
||||||
"port": "^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$",
|
"port": "^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$",
|
||||||
"port_group_id": "",
|
"port_group_id": "",
|
||||||
|
|||||||
1
unifi/device.generated.go
generated
1
unifi/device.generated.go
generated
@@ -308,6 +308,7 @@ func (dst *DeviceOutletOverrides) UnmarshalJSON(b []byte) error {
|
|||||||
|
|
||||||
type DevicePortOverrides struct {
|
type DevicePortOverrides struct {
|
||||||
AggregateMembers []int `json:"aggregate_members,omitempty"` // [1-9]|[1-4][0-9]|5[0-6]
|
AggregateMembers []int `json:"aggregate_members,omitempty"` // [1-9]|[1-4][0-9]|5[0-6]
|
||||||
|
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"`
|
||||||
Autoneg bool `json:"autoneg,omitempty"`
|
Autoneg bool `json:"autoneg,omitempty"`
|
||||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty" validate:"omitempty,oneof=auto force_authorized force_unauthorized mac_based multi_host"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
Dot1XCtrl string `json:"dot1x_ctrl,omitempty" validate:"omitempty,oneof=auto force_authorized force_unauthorized mac_based multi_host"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
||||||
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
||||||
|
|||||||
4
unifi/firewall_zone_policy.generated.go
generated
4
unifi/firewall_zone_policy.generated.go
generated
@@ -70,9 +70,11 @@ type FirewallZonePolicyDestination struct {
|
|||||||
IPGroupID string `json:"ip_group_id,omitempty"`
|
IPGroupID string `json:"ip_group_id,omitempty"`
|
||||||
IPs []string `json:"ips,omitempty" validate:"omitempty,ipv4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
IPs []string `json:"ips,omitempty" validate:"omitempty,ipv4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
MatchOppositeIPs bool `json:"match_opposite_ips"`
|
MatchOppositeIPs bool `json:"match_opposite_ips"`
|
||||||
|
MatchOppositeNetworks bool `json:"match_opposite_networks"`
|
||||||
MatchOppositePorts bool `json:"match_opposite_ports"`
|
MatchOppositePorts bool `json:"match_opposite_ports"`
|
||||||
MatchingTarget string `json:"matching_target,omitempty" validate:"omitempty,oneof=ANY APP APP_CATEGORY IP REGION WEB"` // ANY|APP|APP_CATEGORY|IP|REGION|WEB
|
MatchingTarget string `json:"matching_target,omitempty" validate:"omitempty,oneof=ANY APP APP_CATEGORY IP NETWORK REGION WEB"` // ANY|APP|APP_CATEGORY|IP|NETWORK|REGION|WEB
|
||||||
MatchingTargetType string `json:"matching_target_type,omitempty" validate:"omitempty,oneof=ANY OBJECT SPECIFIC"` // ANY|OBJECT|SPECIFIC
|
MatchingTargetType string `json:"matching_target_type,omitempty" validate:"omitempty,oneof=ANY OBJECT SPECIFIC"` // ANY|OBJECT|SPECIFIC
|
||||||
|
NetworkIDs []string `json:"network_ids,omitempty"`
|
||||||
Port string `json:"port,omitempty"` // ^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$
|
Port string `json:"port,omitempty"` // ^[0-9]+(?:-[0-9]+)?(?:,[0-9]+(?:-[0-9]+)?)*$
|
||||||
PortGroupID string `json:"port_group_id,omitempty"`
|
PortGroupID string `json:"port_group_id,omitempty"`
|
||||||
PortMatchingType string `json:"port_matching_type,omitempty" validate:"omitempty,oneof=ANY SPECIFIC OBJECT"` // ANY|SPECIFIC|OBJECT
|
PortMatchingType string `json:"port_matching_type,omitempty" validate:"omitempty,oneof=ANY SPECIFIC OBJECT"` // ANY|SPECIFIC|OBJECT
|
||||||
|
|||||||
Reference in New Issue
Block a user