Skip to content

Commit d2c2677

Browse files
committed
Implement FirewallRule.IsScopePortList (for DimensionDataResearch/terraform-provider-ddcloud/issues/93).
1 parent 4961641 commit d2c2677

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compute/firewall_rules.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ func (scope *FirewallRuleScope) IsScopePortRange() bool {
114114
return scope.Port != nil && scope.Port.End != nil
115115
}
116116

117+
// IsScopePortList determines whether the firewall rule scope matches a port list.
118+
func (scope *FirewallRuleScope) IsScopePortList() bool {
119+
return scope.PortListID != nil
120+
}
121+
117122
// IsScopeAddressList determines whether the firewall rule scope matches an IP address list.
118123
func (scope *FirewallRuleScope) IsScopeAddressList() bool {
119124
return scope.AddressList != nil || scope.AddressListID != nil

0 commit comments

Comments
 (0)