You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IPv6 address is missing. (Observed in libcloud 3.4.1-5 in Debian sid — the latest I can easily test — but by code inspection applies to HEAD too.)
Patch
Here's a patch too. Not packaging it as a PR because I haven't done all the legwork (test it in 3.6 by hand and by test suite) yet, but posting it here since I didn't want to sit on it until I had time to finish it.
diff --git a/libcloud/compute/drivers/digitalocean.py b/libcloud/compute/drivers/digitalocean.py
index df7f0ae..0ea5346 100644
--- a/libcloud/compute/drivers/digitalocean.py+++ b/libcloud/compute/drivers/digitalocean.py@@ -689,11 +689,11 @@ class DigitalOcean_v2_NodeDriver(DigitalOcean_v2_BaseDriver, DigitalOceanNodeDri
private_ips = []
public_ips = []
if networks:
- for net in networks["v4"]:+ for net in networks.get('v4', []) + networks.get('v6', []):
if net["type"] == "private":
- private_ips = [net["ip_address"]]+ private_ips.append(net["ip_address"])
if net["type"] == "public":
- public_ips = [net["ip_address"]]+ public_ips.append(net["ip_address"])
extra = {}
for key in extra_keys:
This was written against 3.4 but applied cleanly to 3.6 after changing single quotes to double quotes.
Summary
Digital Ocean compute nodes'
.public_ips
attribute doesn't list IPv6 addresses. Patch for 3.6 tested against 3.4 included.Detailed Information
Create a node with a public IPv6 address:
(docs for
ex_create_attr
).Now inspect the node's public IP addresses:
The IPv6 address is missing. (Observed in libcloud 3.4.1-5 in Debian sid — the latest I can easily test — but by code inspection applies to HEAD too.)
Patch
Here's a patch too. Not packaging it as a PR because I haven't done all the legwork (test it in 3.6 by hand and by test suite) yet, but posting it here since I didn't want to sit on it until I had time to finish it.
This was written against 3.4 but applied cleanly to 3.6 after changing single quotes to double quotes.
Result
I'm not sure whether the API contract allows this change.
The text was updated successfully, but these errors were encountered: