[DigitalOcean] Include IPv6 addresses in node public/private IPs#2173
Open
Sanjays2402 wants to merge 1 commit into
Open
[DigitalOcean] Include IPv6 addresses in node public/private IPs#2173Sanjays2402 wants to merge 1 commit into
Sanjays2402 wants to merge 1 commit into
Conversation
The DigitalOcean v2 driver's _to_node() only iterated the "v4" networks list, so a droplet's public IPv6 address was never reported in Node.public_ips. Each match also reassigned the list rather than appending, so only the last address of a given type survived. Iterate both the "v4" and "v6" network lists and append, keeping every reported address. Adds a regression test covering a droplet with both an IPv4 and an IPv6 public address, and updates test_list_nodes_success, whose existing fixture already contains a public IPv6 address that was being dropped. Closes apache#1738
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[DigitalOcean] Include IPv6 addresses in node public/private IPs
Description
Closes #1738
DigitalOcean_v2_NodeDriver._to_node()only iterated thev4networks list, so a droplet's public IPv6 address was never reported inNode.public_ips. Each match also reassigned the list (public_ips = [...]) instead of appending, so only the last address of a given type survived. Both lists are now iterated and addresses appended.This matches the patch proposed in the issue. Note that the existing
list_nodesfixture already contains a public IPv6 address (2604:a880:4:1d0::142:9000) that was being silently dropped, sotest_list_nodes_successwas updated to assert it.Status
done, ready for review
Checklist (tick everything that applies)