Add support for NB frontend VPC IP and NB plan type#660
Conversation
…on-sdk-implement-support-for-nodebalancer-front-end-ip-in-vpc
There was a problem hiding this comment.
Pull request overview
Adds SDK support for NodeBalancer “NB plan type” and frontend VPC addressing, including new VPC-related endpoints on NodeBalancer and corresponding fixtures/tests.
Changes:
- Added
NodeBalancerVPCConfigobject plusNodeBalancer.vpc(),vpcs(),backend_vpcs(), andfrontend_vpcs()endpoints. - Extended
NodeBalancerwith response fieldstype,frontend_address_type, andfrontend_vpc_subnet_id. - Added/updated unit tests and JSON fixtures to cover the new fields and endpoints.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/objects/nodebalancers_test.py | Adds unit tests covering new NodeBalancer fields and VPC config endpoints. |
| test/fixtures/nodebalancers_12345_vpcs_99.json | Fixture for single NodeBalancer VPC config response. |
| test/fixtures/nodebalancers_12345_vpcs.json | Fixture for listing NodeBalancer VPC configs. |
| test/fixtures/nodebalancers_12345_frontend__vpcs.json | Fixture for listing frontend VPC configs. |
| test/fixtures/nodebalancers_12345_backend__vpcs.json | Fixture for listing backend VPC configs. |
| test/fixtures/nodebalancers_123456.json | Updates single NodeBalancer fixture with new response fields. |
| test/fixtures/nodebalancers.json | Updates NodeBalancer list fixture with new response fields. |
| linode_api4/objects/nodebalancer.py | Implements new model/object fields and VPC-related endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
linode_api4/objects/nodebalancer.py
Outdated
| """ | ||
| View VPC information for VPCs associated with this NodeBalancer. | ||
|
|
||
| API Documentation: https://techdocs.akamai.com/linode-api/reference/get-node-balancer-vpc-config |
There was a problem hiding this comment.
Should it not refer to:
https://techdocs.akamai.com/linode-api/reference/get-node-balancer-vpcs ?
There was a problem hiding this comment.
I could swore I fixed that before but I had to mess up my commits and copilot's. Fixed now.
linode_api4/objects/nodebalancer.py
Outdated
| """ | ||
| View VPC information for a VPC associated with this NodeBalancer. | ||
|
|
||
| API Documentation: https://www.linode.com/docs/api/nodebalancers/#nodebalancer-vpcs-view |
There was a problem hiding this comment.
Should it not refer to:
https://techdocs.akamai.com/linode-api/reference/get-node-balancer-vpc-config
?
📝 Description
This PR adds support for NB Frontend IP VPC and
typeNB plan.The changes include adding new endpoints (
vpc(),vpcs(),backend_vpcs(),frontend_vpcs()) and modifying NodeBalancer class to include additional response fields:type,frontend_address_typeandfrontend_vpc_subnet_id.Added and modified unit tests to cover new fields.
✔️ How to Test