Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IPv6 in TNP and edge node resources #1498

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Support IPv6 in TNP and edge node resources #1498

merged 1 commit into from
Jan 16, 2025

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Jan 8, 2025

No description provided.

}
if sw.Ipv6AssignmentSpec != nil {
elem["ipv6_assignment"], err = setIPv6AssignmentInSchema(sw.Ipv6AssignmentSpec)
}
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather check err after 1073, 1076 lines - as err from setIPAssignmentInSchema could be overwritten by setIPv6AssignmentInSchema

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

@@ -1140,6 +1368,7 @@ func getHostSwitchSpecFromSchema(d *schema.ResourceData, m interface{}, nodeType
return nil, err
}
iPAssignmentSpec, err := getIPAssignmentFromSchema(swData["ip_assignment"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check err after getIPAssignmentFromSchema call

@@ -1016,7 +1136,7 @@ func getIPAssignmentFromSchema(ipAssignmentList interface{}) (*data.StructValue,
converter := bindings.NewTypeConverter()

for _, ia := range ipAssignmentList.([]interface{}) {
iaType, iaData, err := getIPAssignmentData(ia.(map[string]interface{}))
iaType, iaData, err := getIPAssignmentData(ia.(map[string]interface{}), ipAssignmentTypes)
Copy link
Member

Choose a reason for hiding this comment

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

I realized that IPAssignmentSpec also supports StaticIpMacListSpec, now we're adding it to the v6 assignementSpec, but the v4 one does not have it. Probably we should add it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, added static_ip_mac option to ipv4, and also the missing no_ipv4 option

@annakhm annakhm merged commit 3c12bfb into master Jan 16, 2025
5 checks passed
@annakhm annakhm deleted the tnp-ipv6 branch January 16, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants