-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
} | ||
if sw.Ipv6AssignmentSpec != nil { | ||
elem["ipv6_assignment"], err = setIPv6AssignmentInSchema(sw.Ipv6AssignmentSpec) | ||
} | ||
if err != nil { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"]) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Signed-off-by: Anna Khmelnitsky <[email protected]>
No description provided.