Skip to content

TPT-4490: Support for firewall rules with numeric and ALL protocols#1000

Merged
lgarber-akamai merged 5 commits into
linode:mainfrom
lgarber-akamai:new/fw-proto-all
Jul 2, 2026
Merged

TPT-4490: Support for firewall rules with numeric and ALL protocols#1000
lgarber-akamai merged 5 commits into
linode:mainfrom
lgarber-akamai:new/fw-proto-all

Conversation

@lgarber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

This pull request adds support for managing firewall rules with numeric and ALL protocols.

✔️ How to Test

NOTE: This feature is not yet generally available. See TPT-4469 for required test environment information.

Unit Testing

make test-unit

Integration Testing

make fixtures TEST_ARGS="-run TestFirewallRules_ExtendedProtocols"

@lgarber-akamai lgarber-akamai requested review from a team as code owners July 1, 2026 18:46
Copilot AI review requested due to automatic review settings July 1, 2026 18:46
@lgarber-akamai lgarber-akamai added new-feature for new features in the changelog. project for new projects in the changelog. labels Jul 1, 2026
@lgarber-akamai lgarber-akamai requested review from psnoch-akamai and zliang-akamai and removed request for a team July 1, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client/test support for Cloud Firewall rules using extended protocol values: the ALL protocol and numeric IP protocol numbers, ensuring these values serialize and round-trip correctly through create/get flows.

Changes:

  • Introduces ProtocolALL as a NetworkProtocol constant and updates NetworkProtocol documentation.
  • Adds a unit test covering JSON marshaling for ALL and numeric protocol values (with/without ports).
  • Adds an integration test + VCR fixture validating firewall creation and retrieval with extended protocols.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
firewall_rules.go Documents extended protocol usage and adds a protocol constant for ALL.
test/unit/firewall_rules_test.go Adds unit coverage for marshaling rules with ALL and numeric protocols.
test/integration/firewall_rules_test.go Adds an integration test exercising create/get behavior with extended protocols.
test/integration/fixtures/TestFirewall_CreateWithExtendedProtocols.yaml Records API interactions for the new integration test scenario.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread firewall_rules.go
Comment thread firewall_rules.go
Comment thread test/integration/firewall_rules_test.go
lgarber-akamai and others added 2 commits July 1, 2026 14:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread firewall_rules.go
ICMP NetworkProtocol = "ICMP"
IPENCAP NetworkProtocol = "IPENCAP"

AllNetworkProtocols NetworkProtocol = "ALL"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up settling on linodego.AllNetworkProtocols instead of the more generic linodego.ALL or ambiguous linodego.ProtocolAll. Let me know if you have any thoughts or ideas!

@ezilber-akamai ezilber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests passed locally!

@lgarber-akamai lgarber-akamai merged commit 1d06eb4 into linode:main Jul 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog. project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants