Skip to content

Project: Add support for NB Front-End IP in VPC-MTC + 40Gbps NB-MTC#699

Open
mawilk90 wants to merge 4 commits into
devfrom
proj/nb-front-end-ip-in-vpc
Open

Project: Add support for NB Front-End IP in VPC-MTC + 40Gbps NB-MTC#699
mawilk90 wants to merge 4 commits into
devfrom
proj/nb-front-end-ip-in-vpc

Conversation

@mawilk90
Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 commented May 21, 2026

📝 Description

This PR merges support for NB Front-End IP + 40Gbps features into the dev branch for release.

✔️ How to Test

make test-unit
make test-int TEST_SUITE=nodebalancer TEST_ARGS="-k test_nb_with"

dawiddzhafarov and others added 3 commits March 9, 2026 15:33
* Add support for NB frontend VPC IP and NB plan type

* Fix test fixture and doc link

* Fix NodeBalancerVPCConfig struct and address copilot suggestions

* Fix doc links
* Create integration tests for NodeBalancer Front-End IP & 40Gbps

* Update TODO message

* Linter fixes

* Copilot remarks refactor

* Remove redundant variables (PR remarks)

* Modify tests to filter out invalid regions for premium NBs

* Modify test names to indicate that test is expected to fail

* Add DevCloud region to PREMIUM_REGIONS

* Linter fix

* Add note about no DevCloud region in PREMIUM_40GB_REGIONS list
…eate (#676)

* Replace vpcs with backend_vpcs to be passed to POST /nodebalancers

* Add test for deprecated VPCs attribute
@mawilk90 mawilk90 added new-feature for new features in the changelog. project for new projects in the changelog. and removed new-feature for new features in the changelog. labels May 21, 2026
@mawilk90 mawilk90 changed the title TPT-4126: Project NB Front-End IP in VPC-MTC + 40Gbps NB-MTC Project: Add support for NB Front-End IP in VPC-MTC + 40Gbps NB-MTC May 28, 2026
@mawilk90 mawilk90 marked this pull request as ready for review May 28, 2026 09:04
@mawilk90 mawilk90 requested review from a team as code owners May 28, 2026 09:04
@mawilk90 mawilk90 requested review from Copilot, ezilber-akamai, psnoch-akamai and yec-akamai and removed request for a team May 28, 2026 09:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds SDK support for two new NodeBalancer features: VPC front-end IP (configurable via frontend_vpcs/backend_vpcs on create) and the new premium_40gb NodeBalancer type. Exposes a NodeBalancerVPCConfig derived object plus vpcs(), vpc(id), backend_vpcs(), and frontend_vpcs() accessors on NodeBalancer, along with new read-only attributes type, frontend_address_type, and frontend_vpc_subnet_id. Adds unit and integration test coverage (including new VPC/region fixtures), with some integration assertions for backend_vpcs/frontend_vpcs left commented as TODO pending the corresponding API endpoints.

Changes:

  • New NodeBalancerVPCConfig DerivedBase + four nested-endpoint accessors and three new read-only NodeBalancer properties.
  • New integration test scenarios covering backend-only VPC, IPv4-only single-stack VPC frontends, premium/premium_40gb types, mixed front/backend VPCs, and deprecated vpcs attribute; supported by a new valid_regions filter in get_region and new VPC fixtures.
  • New/updated unit fixtures and tests for list/get NodeBalancers and VPC config endpoints.

Reviewed changes

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

Show a summary per file
File Description
linode_api4/objects/nodebalancer.py Adds NodeBalancerVPCConfig, new model fields, and vpcs/vpc/backend_vpcs/frontend_vpcs methods.
test/integration/conftest.py Adds valid_regions filter to get_region and new VPC session/function fixtures including premium region variant.
test/integration/models/nodebalancer/test_nodebalancer.py Adds premium region constants and integration tests for VPC frontend/backend scenarios and premium_40gb type.
test/unit/objects/nodebalancers_test.py Adds unit tests for list/get NodeBalancer and the new VPC accessor methods.
test/fixtures/nodebalancers.json Adds type, frontend_address_type, frontend_vpc_subnet_id fields to the two NodeBalancer entries.
test/fixtures/nodebalancers_123456.json Adds the same three new fields to the single-NB fixture.
test/fixtures/nodebalancers_12345_vpcs.json New fixture for the VPC config list endpoint.
test/fixtures/nodebalancers_12345_vpcs_99.json New fixture for the single VPC config endpoint.
test/fixtures/nodebalancers_12345_frontend__vpcs.json New fixture for the frontend_vpcs endpoint.
test/fixtures/nodebalancers_12345_backend__vpcs.json New fixture for the backend_vpcs endpoint.

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

Comment on lines +432 to +450
API Documentation: TODO

:returns: A List of NodeBalancerVPCConfig of the Linode NodeBalancer.
:rtype: List[NodeBalancerVPCConfig]
"""
result = self._client.get(
"{}/backend_vpcs".format(NodeBalancer.api_endpoint), model=self
)

return [
NodeBalancerVPCConfig(self._client, vpc["id"], self.id, json=vpc)
for vpc in result["data"]
]

def frontend_vpcs(self):
"""
View VPC information for frontend VPCs associated with this NodeBalancer.

API Documentation: TODO
Comment on lines +22 to +42
PREMIUM_REGIONS = [
"nl-ams",
"jp-tyo-3",
"sg-sin-2",
"de-fra-2",
"in-bom-2",
"gb-lon",
"us-lax",
"id-cgk",
"us-mia",
"it-mil",
"jp-osa",
"in-maa",
"se-sto",
"br-gru",
"us-sea",
"fr-par",
"us-iad",
"pl-labkrk-2", # DevCloud
]
PREMIUM_40GB_REGIONS = ["us-iad"] # No DevCloud region for premium_40gb type
Comment on lines +119 to +125
regions = get_regions(client, capabilities, site_type)

# To filter out regions that cannot be used for the Linode resource
if valid_regions:
regions = [reg for reg in regions if reg.id in valid_regions]

return random.choice(regions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants