summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2019-09-27 20:31:57 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-09-27 20:31:57 +0000
commit052d655cfba37243396c491a1e7892ba3736ab6f (patch)
tree0de3c8d4bc097cc52decc8ff7ef1aff13152d51f /cloudinit
parent762f230cb37bdceaed3fb264e9cede48c2749d3f (diff)
downloadvyos-cloud-init-052d655cfba37243396c491a1e7892ba3736ab6f.tar.gz
vyos-cloud-init-052d655cfba37243396c491a1e7892ba3736ab6f.zip
debian/ubuntu: add missing word to netplan/ENI header
Specifically, add in "reboot" to make it clear what people should expect when modifying the file. This also renames the variable to indicate it is used for netplan and ENI, not just ENI. LP: #1845669
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/distros/debian.py11
-rw-r--r--cloudinit/distros/ubuntu.py4
2 files changed, 8 insertions, 7 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 0ad93ffe..cf082c73 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -29,9 +29,10 @@ APT_GET_WRAPPER = {
'enabled': 'auto',
}
-ENI_HEADER = """# This file is generated from information provided by
-# the datasource. Changes to it will not persist across an instance.
-# To disable cloud-init's network configuration capabilities, write a file
+NETWORK_FILE_HEADER = """\
+# This file is generated from information provided by the datasource. Changes
+# to it will not persist across an instance reboot. To disable cloud-init's
+# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
"""
@@ -48,9 +49,9 @@ class Distro(distros.Distro):
}
renderer_configs = {
"eni": {"eni_path": network_conf_fn["eni"],
- "eni_header": ENI_HEADER},
+ "eni_header": NETWORK_FILE_HEADER},
"netplan": {"netplan_path": network_conf_fn["netplan"],
- "netplan_header": ENI_HEADER,
+ "netplan_header": NETWORK_FILE_HEADER,
"postcmds": True}
}
diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py
index e5fcbc58..23be3bdd 100644
--- a/cloudinit/distros/ubuntu.py
+++ b/cloudinit/distros/ubuntu.py
@@ -30,9 +30,9 @@ class Distro(debian.Distro):
}
self.renderer_configs = {
"eni": {"eni_path": self.network_conf_fn["eni"],
- "eni_header": debian.ENI_HEADER},
+ "eni_header": debian.NETWORK_FILE_HEADER},
"netplan": {"netplan_path": self.network_conf_fn["netplan"],
- "netplan_header": debian.ENI_HEADER,
+ "netplan_header": debian.NETWORK_FILE_HEADER,
"postcmds": True}
}