Skip to content

Implement support for VPC Dual Stack#706

Merged
lgarber-akamai merged 3 commits intolinode:proj/vpc-dual-stackfrom
lgarber-akamai:new/vpc-dual-stack
Apr 10, 2025
Merged

Implement support for VPC Dual Stack#706
lgarber-akamai merged 3 commits intolinode:proj/vpc-dual-stackfrom
lgarber-akamai:new/vpc-dual-stack

Conversation

@lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Apr 1, 2025

📝 Description

This pull request implements support for endpoints and request/response fields relating to Dual Stack (IPv6) VPCs. Because the API changes for this feature aren't yet available this PR was developed against unit test mocks.

Changes include:

  • A new ipv6 field under instance config interfaces (both nested and CRUD)
  • A new ipv6 field on VPCs and VPC subnets
  • New ipv6_range, ipv6_is_public, and ipv6_addresses fields under the VPC IPs endpoints

✔️ How to Test

The following test steps assume you have pulled down this PR locally.

Unit Testing

make test-unit

Integration Testing

Not yet available.

Manual Testing

Not yet available.

@lgarber-akamai lgarber-akamai added the new-feature for new features in the changelog. label Apr 1, 2025
@lgarber-akamai lgarber-akamai changed the base branch from main to proj/vpc-dual-stack April 1, 2025 15:38
Comment on lines +94 to 102
type InstanceConfigInterfaceUpdateOptionsIPv6SLAAC struct {
Range *string `json:"range,omitempty"`
}

// InstanceConfigInterfaceUpdateOptionsIPv6Range represents a single IPv6 ranges of a Linode interface
// specified during updates.
type InstanceConfigInterfaceUpdateOptionsIPv6Range struct {
Range *string `json:"range,omitempty"`
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a fan of the redundancy here but I wanted to make sure we can account for any potential future divergences.

@lgarber-akamai lgarber-akamai marked this pull request as ready for review April 1, 2025 17:56
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner April 1, 2025 17:56
@lgarber-akamai lgarber-akamai requested review from jriddle-linode and ykim-akamai and removed request for a team April 1, 2025 17:56
Comment on lines +83 to +84

assert.Equal(t, "1234::5678/64", iface.IPv6.SLAAC[0].Range)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the future it'd be helpful if we could also assert on the raw request body made by unit test requests

@lgarber-akamai lgarber-akamai marked this pull request as draft April 1, 2025 18:04
@lgarber-akamai lgarber-akamai marked this pull request as ready for review April 1, 2025 18:04
@lgarber-akamai lgarber-akamai marked this pull request as draft April 1, 2025 20:39
@lgarber-akamai lgarber-akamai marked this pull request as ready for review April 2, 2025 14:18
//
// This is primarily used to ensure that the GetCreateOptions() and GetUpdateOptions()
// functions are implemented correctly.
func assertJSONObjectsSimilar[TA, TB any](t testing.TB, a TA, b TB) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wondering if this would be worth adding in a separate PR against the main branch since it discovered a few null pointer derefs in certain GetCreateOptions(...) and GetUpdateOptions(...) implementations.

Copy link
Contributor

Choose a reason for hiding this comment

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

These helpers are great addition. Nice work!

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.

works locally and looks good, agree with duplicating the assertion to main

Copy link
Contributor

@ykim-akamai ykim-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!

@lgarber-akamai lgarber-akamai merged commit 61f33b5 into linode:proj/vpc-dual-stack Apr 10, 2025
10 checks passed
rahulait pushed a commit to rahulait/linodego that referenced this pull request Jun 27, 2025
* Implement support for Dual Stack (IPv6) VPCs

* Add GetCreateOptions() and GetUpdateOptions() assertions

* Fix assertJSONObjectsSimilar
rahulait pushed a commit to rahulait/linodego that referenced this pull request Jul 8, 2025
* Implement support for Dual Stack (IPv6) VPCs

* Add GetCreateOptions() and GetUpdateOptions() assertions

* Fix assertJSONObjectsSimilar
lgarber-akamai added a commit that referenced this pull request Aug 22, 2025
Implement support for VPC Dual Stack (#706)

Add support for /vpcs/ipv6s and /vpcs/{id}/ipv6s (#791)
lgarber-akamai added a commit that referenced this pull request Aug 25, 2025
* project: VPC Dual Stack

Implement support for VPC Dual Stack (#706)

Add support for /vpcs/ipv6s and /vpcs/{id}/ipv6s (#791)

* Remove .DS_Store

* Re-run final fixtures

* VPC Dual Stack: Add documentation and LA notices (#806)

* Add missing VPC Dual Stack docs and LA notices

* Fix spacing
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