summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Corbin <mcorbin@scaleway.com>2022-05-16 23:46:09 +0200
committerGitHub <noreply@github.com>2022-05-16 16:46:09 -0500
commitfbae864190fa5790dc4958a980600c884a2778b0 (patch)
treed8597de13057c58fd09e2b20282cff26fc02a3c3
parent9759bf7f9f58c14b761e88658ab54f3ed8a47cf6 (diff)
downloadcloud-init-git-fbae864190fa5790dc4958a980600c884a2778b0.tar.gz
Scaleway: Fix network configuration for netplan 0.102 and later (#1455)
Since version 0.102 netplan no longer supports the option `gateway6`. This commit changes this option to the newer `routes` one.
-rw-r--r--cloudinit/sources/DataSourceScaleway.py8
-rw-r--r--tests/unittests/sources/test_scaleway.py8
-rw-r--r--tools/.github-cla-signers1
3 files changed, 15 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceScaleway.py b/cloudinit/sources/DataSourceScaleway.py
index 8e5dd82c..c47a8bf5 100644
--- a/cloudinit/sources/DataSourceScaleway.py
+++ b/cloudinit/sources/DataSourceScaleway.py
@@ -254,8 +254,14 @@ class DataSourceScaleway(sources.DataSource):
{
"type": "static",
"address": "%s" % self.metadata["ipv6"]["address"],
- "gateway": "%s" % self.metadata["ipv6"]["gateway"],
"netmask": "%s" % self.metadata["ipv6"]["netmask"],
+ "routes": [
+ {
+ "network": "::",
+ "prefix": "0",
+ "gateway": "%s" % self.metadata["ipv6"]["gateway"],
+ }
+ ],
}
]
netcfg["subnets"] = subnets
diff --git a/tests/unittests/sources/test_scaleway.py b/tests/unittests/sources/test_scaleway.py
index d7e8b969..52bcbc17 100644
--- a/tests/unittests/sources/test_scaleway.py
+++ b/tests/unittests/sources/test_scaleway.py
@@ -444,8 +444,14 @@ class TestDataSourceScaleway(HttprettyTestCase):
{
"type": "static",
"address": "2000:abc:4444:9876::42:999",
- "gateway": "2000:abc:4444:9876::42:000",
"netmask": "127",
+ "routes": [
+ {
+ "gateway": "2000:abc:4444:9876::42:000",
+ "network": "::",
+ "prefix": "0",
+ }
+ ],
},
],
}
diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers
index 77cb59b7..cd7efbd4 100644
--- a/tools/.github-cla-signers
+++ b/tools/.github-cla-signers
@@ -73,6 +73,7 @@ nishigori
olivierlemasle
omBratteng
onitake
+Oursin
qubidt
renanrodrigo
rhansen