Skip to content

TPT-4600: NAT Service for VPC - #889

Merged
ezilber-akamai merged 9 commits into
linode:proj/nat-service-for-vpcfrom
ezilber-akamai:TPT-4600-support-nat-service
Oct 22, 2026
Merged

ezilber-akamai merged 9 commits into
linode:proj/nat-service-for-vpcfrom
ezilber-akamai:TPT-4600-support-nat-service

Conversation

@ezilber-akamai

@ezilber-akamai ezilber-akamai commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📝 Description

Implemented support for new features arriving with NAT Service for VPC.

✔️ How to Test

Pull down this PR locally, run make install, and point your environment towards devcloud.

make test-int TEST_SUITE="natgateway_basic"
make test-int TEST_SUITE="natgateway_complex"
make test-int TEST_SUITE="natgateway_settings_info"
make test-int TEST_SUITE="natgateway_type_list"
make test-int TEST_SUITE="vpc_subnet_natgateway"

@ezilber-akamai
ezilber-akamai requested review from a team as code owners October 13, 2026 15:51
@ezilber-akamai
ezilber-akamai removed the request for review from a team October 13, 2026 15:51
@ezilber-akamai ezilber-akamai added the new-feature for new features in the changelog. label Oct 13, 2026
@ezilber-akamai
ezilber-akamai requested review from psnoch-akamai and zliang-akamai and removed request for a team October 13, 2026 15:51
Comment thread plugins/modules/natgateway.py Fixed
@mawilk90
mawilk90 self-requested a review October 15, 2026 07:22
Comment thread tests/integration/targets/ip_basic/tasks/main.yaml
@mawilk90

Copy link
Copy Markdown
Contributor

Tests passed locally!

Comment thread plugins/modules/natgateway.py Outdated
@zliang-akamai

Copy link
Copy Markdown
Member

Can we merge dev into the project branch first to avoid the large PR diff?

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.

🟡 Changes recommended

Secret-redaction regressions and NAT Gateway validation, idempotency, and contract defects remain unresolved.

7 open findings
What changed in this PR

Adds VPC NAT Service support to the linode.cloud Ansible collection, including NAT Gateway management and reserved IPv4 workflows.

Changes:

  • Adds NAT Gateway, reserved-IP, and regional VPC availability modules.
  • Extends subnet, instance, and NodeBalancer networking options.
  • Adds tests and generated documentation, updates shared helpers, and adjusts dependencies.
File Description
tests/​unit/​modules/​test_ip.py Tests IP allocation, promotion, and tagging.
tests/​integration/​targets/​vpc_subnet/​tasks/​main.yaml Updates label-validation expectations.
tests/​integration/​targets/​vpc_subnet_natgateway/​tasks/​main.yaml Tests gateway assignment and detachment.
tests/​integration/​targets/​vpc_basic/​tasks/​main.yaml Updates label-validation expectations.
tests/​integration/​targets/​reserved_ip_list/​tasks/​main.yaml Tests reserved-IP listing.
tests/​integration/​targets/​reserved_ip_info/​tasks/​main.yaml Tests reserved-IP lookup.
tests/​integration/​targets/​reserved_ip_basic/​tasks/​main.yaml Tests reservation and tag updates.
tests/​integration/​targets/​region_vpc_availability_info/​tasks/​main.yaml Tests regional VPC availability lookup.
tests/​integration/​targets/​nodebalancer_reserved_ip/​tasks/​main.yaml Tests NodeBalancer reserved-IP assignment.
tests/​integration/​targets/​natgateway_type_list/​tasks/​main.yaml Tests gateway type listing.
tests/​integration/​targets/​natgateway_settings_info/​tasks/​main.yaml Tests gateway settings lookup.
tests/​integration/​targets/​natgateway_complex/​tasks/​main.yaml Tests gateway addresses and interfaces.
tests/​integration/​targets/​natgateway_basic/​tasks/​main.yaml Tests gateway lifecycle and discovery.
tests/​integration/​targets/​ip_basic/​tasks/​main.yaml Tests promotion and tagging idempotency.
tests/​integration/​targets/​instance_reserved_ip/​tasks/​main.yaml Tests instance reserved-IP assignment.
tests/​integration/​targets/​instance_basic/​tasks/​main.yaml Refines region selection and update assertions.
requirements.txt Pins the SDK to a feature commit.
requirements-dev.txt Updates development dependency minimums.
README.md Lists new collection modules.
plugins/​modules/​vpc_subnet.py Adds gateway assignment support.
plugins/​modules/​reserved_ip.py Implements reserved-IP management.
plugins/​modules/​reserved_ip_list.py Lists reserved IPs.
plugins/​modules/​reserved_ip_info.py Retrieves reserved-IP details.
plugins/​modules/​region_vpc_availability_info.py Retrieves regional VPC availability.
plugins/​modules/​nodebalancer.py Accepts reserved IPv4 during creation.
plugins/​modules/​natgateway.py Implements gateway lifecycle and address management.
plugins/​modules/​natgateway_type_list.py Lists gateway types.
plugins/​modules/​natgateway_settings_info.py Retrieves gateway settings.
plugins/​modules/​natgateway_list.py Lists gateways.
plugins/​modules/​natgateway_interface_list.py Lists gateway interfaces.
plugins/​modules/​natgateway_info.py Retrieves gateways by ID or label.
plugins/​modules/​natgateway_address_list.py Lists gateway address assignments.
plugins/​modules/​natgateway_address_interface_list.py Lists interfaces using a gateway address.
plugins/​modules/​natgateway_address_info.py Retrieves gateway address details.
plugins/​modules/​ip.py Adds reserved-IP allocation, promotion, and tagging.
plugins/​modules/​instance.py Adds reserved IPv4 and changes authentication handling.
plugins/​module_utils/​linode_helper.py Extends serialization and null-safe comparisons.
plugins/​module_utils/​doc_fragments/​reserved_ip.py Adds reservation examples and samples.
plugins/​module_utils/​doc_fragments/​reserved_ip_list.py Adds reserved-IP listing examples.
plugins/​module_utils/​doc_fragments/​reserved_ip_info.py Adds reserved-IP lookup examples.
plugins/​module_utils/​doc_fragments/​region_vpc_availability_info.py Adds availability examples and samples.
plugins/​module_utils/​doc_fragments/​nodebalancer.py Adds a reserved-IP creation example.
plugins/​module_utils/​doc_fragments/​natgateway.py Adds gateway examples and samples.
plugins/​module_utils/​doc_fragments/​natgateway_type_list.py Adds gateway type examples.
plugins/​module_utils/​doc_fragments/​natgateway_settings_info.py Adds gateway settings examples.
plugins/​module_utils/​doc_fragments/​natgateway_list.py Adds gateway listing examples.
plugins/​module_utils/​doc_fragments/​natgateway_interface_list.py Adds interface listing examples.
plugins/​module_utils/​doc_fragments/​natgateway_info.py Adds gateway lookup examples.
plugins/​module_utils/​doc_fragments/​natgateway_address_list.py Adds address listing examples.
plugins/​module_utils/​doc_fragments/​natgateway_address_interface_list.py Adds address-interface examples.
plugins/​module_utils/​doc_fragments/​natgateway_address_info.py Adds address lookup examples.
plugins/​module_utils/​doc_fragments/​ip.py Adds reservation workflows and response fields.
plugins/​module_utils/​doc_fragments/​ip_info.py Extends IP response samples.
plugins/​module_utils/​doc_fragments/​instance.py Adds a reserved-IP instance example.
docs/​modules/​vpc_subnet.md Documents gateway assignment options.
docs/​modules/​reserved_ip.md Documents reserved-IP management.
docs/​modules/​reserved_ip_list.md Documents reserved-IP listing.
docs/​modules/​reserved_ip_info.md Documents reserved-IP lookup.
docs/​modules/​region_vpc_availability_info.md Documents regional availability lookup.
docs/​modules/​nodebalancer.md Documents reserved IPv4 creation.
docs/​modules/​natgateway.md Documents gateway management.
docs/​modules/​natgateway_type_list.md Documents gateway type listing.
docs/​modules/​natgateway_settings_info.md Documents gateway settings lookup.
docs/​modules/​natgateway_list.md Documents gateway listing.
docs/​modules/​natgateway_interface_list.md Documents gateway interface listing.
docs/​modules/​natgateway_info.md Documents gateway lookup.
docs/​modules/​natgateway_address_list.md Documents gateway address listing.
docs/​modules/​natgateway_address_interface_list.md Documents address-interface listing.
docs/​modules/​natgateway_address_info.md Documents gateway address lookup.
docs/​modules/​ip.md Documents reservation and tagging workflows.
docs/​modules/​ip_rdns.md Updates IP response samples.
docs/​modules/​ip_info.md Updates IP response samples.
docs/​modules/​instance.md Documents reserved IPv4 and revised authentication descriptions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/modules/instance.py
Comment thread plugins/modules/instance.py
Comment thread plugins/modules/natgateway.py
Comment thread plugins/modules/natgateway.py Outdated
Comment thread plugins/modules/natgateway.py
Comment thread plugins/modules/natgateway.py
Comment thread plugins/modules/vpc_subnet.py Outdated

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.

Comment thread plugins/modules/natgateway.py Outdated
Comment thread plugins/modules/natgateway.py Outdated
Comment thread plugins/modules/natgateway.py
Comment thread plugins/modules/natgateway.py
Comment thread plugins/modules/natgateway.py Fixed

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.

Comment thread plugins/modules/natgateway.py Outdated
Comment thread plugins/modules/natgateway.py Outdated
Comment thread plugins/modules/natgateway.py Fixed
Comment thread plugins/modules/natgateway.py Fixed
@ezilber-akamai
ezilber-akamai force-pushed the TPT-4600-support-nat-service branch from 6af9876 to c3cb349 Compare October 21, 2026 14:16
@zliang-akamai
zliang-akamai requested a balanced review from Copilot October 21, 2026 20:30

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.

🔵 Needs a closer look

Capacity-triggered address removal and rollback need focused regression coverage and human validation before approval.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Skip NAT Gateway tests when no eligible regions exist

tests/​integration/​targets/​natgateway_complex/​tasks/​main.yaml:11

If the configured endpoint has no core regions advertising NAT Gateway support, this passes an empty list to random and fails before exercising the feature. The same issue occurs in natgateway_basic and vpc_subnet_natgateway. scripts/test_all.sh:25 automatically includes all three targets, so this also breaks full-suite runs against endpoints without NAT support. Compute the eligible-region list first and skip each target when it is empty, before selecting a region or creating resources.

2 resolved since last review

Review effort: Balanced

Comment on lines +342 to +346
early_remove_count = 0
if addresses_to_add:
early_remove_count = self._check_address_capacity(
current_addresses, addresses_to_add, addresses_to_remove
)
@ezilber-akamai
ezilber-akamai merged commit ac2ffb9 into linode:proj/nat-service-for-vpc Oct 22, 2026
13 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.

5 participants