Skip to content

Conversation

@lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Apr 11, 2025

📝 Description

This pull requests adds support for Firewall Templates, which allow API consumers to access Akamai-defined common Firewall rule sets.

NOTE: As of now,Firewall templates are only intended to be accessed by the user and are not intended to be specified at resource creation.

✔️ How to Test

The following test steps assume you have pulled down this PR locally and run make install. Additionally, your Linode account must have access to Enhanced Interfaces.

Unit Testing

make test-unit

Integration Testing

make test-int TEST_COMMAND=models/firewall/test_firewall_templates.py

Manual Testing

  1. In a linode_api4-python sandbox environment (e.g. dx-devenv), run the following:
import json
import os

from linode_api4 import LinodeClient

client = LinodeClient(os.getenv("LINODE_TOKEN"), base_url="https://api.linode.com/v4beta")

templates = client.networking.firewall_templates()

for template in templates:
    print(f"{template.slug}:\n{json.dumps(template.rules.dict, indent=4)}\n\n")
  1. Ensure the output contains all API-exposed Firewall Templates and their rules.

@lgarber-akamai lgarber-akamai added the new-feature for new features in the changelog. label Apr 11, 2025
@lgarber-akamai lgarber-akamai force-pushed the new/firewall-templates branch from e76039c to 1f95779 Compare April 11, 2025 15:13
@lgarber-akamai lgarber-akamai marked this pull request as ready for review April 11, 2025 15:25
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner April 11, 2025 15:25
@lgarber-akamai lgarber-akamai requested review from ezilber-akamai and jriddle-linode and removed request for a team April 11, 2025 15:26
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

LGTM! All tests are passing locally.

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM and is passing locally, thanks!

@lgarber-akamai lgarber-akamai merged commit 82a2772 into linode:proj/enhanced-interfaces Apr 18, 2025
12 checks passed
zliang-akamai added a commit that referenced this pull request Sep 22, 2025
* Enhanced Interfaces: Add support for Firewall templates (#529)

* Add support for Firewall Templates

* oops

* Add LA notices

* Enhanced Interfaces: Add account-related fields (#525)

* Enhanced Interfaces: Add account-related fields

* Add setting enum

* Add LA notice

* Drop residual print

* Enhanced Interfaces: Implement endpoints & fields related to VPCs and non-interface networking (#526)

* Implement endpoints & fields related to VPCs and non-interface networking

* Add LA notices

* Enhanced Interfaces: Add support for Linode-related endpoints and fields (#533)

* Add support for Linode-related endpoints and fields

* oops

* tiny fixes

* fix docsa

* Add docs examples

* Docs fixes

* oops

* Remove irrelevant test

* Add LA notices

* Fill in API documentation URLs

* Add return types

* Enable `include_none_values` in FirewallSettingsDefaultFirewallIDs (#558)

* Linode Interfaces: Allow specifying ExplicitNullValue for LinodeInterfaceOptions firewall ID (#565)

* Add ExplicitNullValue support

* Fix failing integration tests

* Add unit tests

* Add docs disclaimer

* Fix

* Update test/fixtures/linode_instances.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/unit/objects/linode_test.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/integration/conftest.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode_api4/objects/linode.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* More fixes

* lint

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary local imports

* Fix IPv6 addresses

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/unit/objects/networking_test.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update test/unit/objects/linode_test.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Lena Garber <lgarber@akamai.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
lgarber-akamai added a commit that referenced this pull request Oct 7, 2025
* Enhanced Interfaces: Add support for Firewall templates (#529)

* Add support for Firewall Templates

* oops

* Add LA notices

* Enhanced Interfaces: Add account-related fields (#525)

* Enhanced Interfaces: Add account-related fields

* Add setting enum

* Add LA notice

* Drop residual print

* Enhanced Interfaces: Implement endpoints & fields related to VPCs and non-interface networking (#526)

* Implement endpoints & fields related to VPCs and non-interface networking

* Add LA notices

* Implement support for VPC Dual Stack (#524)

* Enhanced Interfaces: Add support for Linode-related endpoints and fields (#533)

* Add support for Linode-related endpoints and fields

* oops

* tiny fixes

* fix docsa

* Add docs examples

* Docs fixes

* oops

* Remove irrelevant test

* Add LA notices

* Fill in API documentation URLs

* Add return types

* Enable `include_none_values` in FirewallSettingsDefaultFirewallIDs (#558)

* VPC Dual Stack: Support changes related to Linode Interfaces (#559)

* Implementation; needs tests

* Add integration tests

* vpctest

* removeprint

* test

* Fix conflicts

* Fix missed conflict

---------

Co-authored-by: Zhiwei Liang <zliang@akamai.com>
Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Co-authored-by: vshanthe <vshanthe@akamai.com>
Co-authored-by: Vinay <143587840+vshanthe@users.noreply.github.com>
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants