Skip to content

Enhanced Interfaces: Add support for Firewall templates #529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 jriddle-linode and ezilber-akamai 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
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