Skip to content

TPT-4462: Support VPC RDMA Interfaces#711

Open
yec-akamai wants to merge 5 commits into
linode:proj/rdma-interfacesfrom
yec-akamai:TPT-4462/support-rdma
Open

TPT-4462: Support VPC RDMA Interfaces#711
yec-akamai wants to merge 5 commits into
linode:proj/rdma-interfacesfrom
yec-akamai:TPT-4462/support-rdma

Conversation

@yec-akamai

@yec-akamai yec-akamai commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Add support to specify VPC type and RDMA VPC. Allow to create the RDMA intercase with the instance creation. Allow to change the RDMA interface with the interface object.

✔️ How to Test

make test-unit

@yec-akamai yec-akamai added the new-feature for new features in the changelog. label Jun 23, 2026
@yec-akamai yec-akamai marked this pull request as ready for review June 23, 2026 20:47
@yec-akamai yec-akamai requested review from a team as code owners June 23, 2026 20:47
@yec-akamai yec-akamai requested review from Copilot, jbilskiAkam, mawilk90 and psnoch-akamai and removed request for a team June 23, 2026 20:47
@yec-akamai yec-akamai changed the base branch from dev to proj/rdma-interfaces June 23, 2026 20:49

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.

Pull request overview

Adds SDK support for RDMA-capable VPCs by introducing a VPC type field and RDMA VPC Linode interface structures, plus corresponding unit/fixture updates.

Changes:

  • Add vpc_type support to VPC objects and VPC create requests (with VPCType enum).
  • Add RDMA VPC (rdma_vpc) interface option/response models and unit tests for GET/PUT + instance-create serialization.
  • Extend fixtures and a small integration-test import cleanup to keep tests passing.

Reviewed changes

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

Show a summary per file
File Description
test/unit/objects/vpc_test.py Adds assertions + create-request tests for vpc_type handling.
test/unit/objects/linode_interface_test.py Adds RDMA VPC interface option builder and GET/PUT unit coverage.
test/unit/groups/linode_test.py Adds instance-create unit coverage for RDMA VPC interface serialization.
test/integration/models/networking/test_networking.py Import formatting cleanup only.
test/fixtures/vpcs.json Adds vpc_type to VPC list fixture.
test/fixtures/vpcs_123456.json Adds vpc_type to VPC detail fixture.
test/fixtures/vpcs_123456_subnets.json Adds vpc_type to VPC subnets list fixture.
test/fixtures/vpcs_123456_subnets_789.json Adds vpc_type to VPC subnet detail fixture.
test/fixtures/linode_instances_124_interfaces_999.json New fixture for RDMA VPC Linode interface GET response.
linode_api4/objects/vpc.py Introduces VPCType and maps vpc_type onto VPC/VPCSubnet properties.
linode_api4/objects/region.py Adds gpudirect_rdma region capability enum value.
linode_api4/objects/linode.py Documents RDMA interface creation limitation on interface_create.
linode_api4/objects/linode_interfaces.py Adds RDMA VPC option/response JSONObject models + LinodeInterface.rdma_vpc property.
linode_api4/groups/vpc.py Adds vpc_type parameter to VPC create and forwards it to the API.

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

Comment on lines +83 to +96
def build_interface_options_rdma_vpc():
return LinodeInterfaceOptions(
firewall_id=-1,
rdma_vpc=LinodeInterfaceRDMAVPCOptions(
subnet_id=1234,
ipv4=LinodeInterfaceRDMAVPCIPv4Options(
addresses=[
LinodeInterfaceRDMAVPCIPv4AddressOptions(
address="auto", primary=True
)
]
),
),
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's the value used in the API spec. We may verify which value to put in the request once we have the API works

Comment on lines +156 to +165
assert m.call_data["interfaces"][0] == {
"firewall_id": -1,
"rdma_vpc": {
"subnet_id": 1234,
"ipv4": {
"addresses": [{"address": "auto", "primary": True}]
},
},
}

Comment on lines +2118 to +2122
.. note::
RDMA VPC interfaces (``rdma_vpc``) cannot be added via this
endpoint. They may only be specified at instance creation time via
:func:`linode_api4.LinodeGroup.instance_create`.
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.

2 participants