Merge ~oddbloke/cloud-init/+git/cloud-init:net into cloud-init:master

Proposed by Dan Watkins
Status: Merged
Approved by: Chad Smith
Approved revision: 4869a1975f701307e71a12788018a54dde022eb3
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~oddbloke/cloud-init/+git/cloud-init:net
Merge into: cloud-init:master
Diff against target: 89 lines (+17/-16)
3 files modified
cloudinit/distros/debian.py (+6/-5)
cloudinit/distros/ubuntu.py (+2/-2)
tests/unittests/test_distros/test_netconfig.py (+9/-9)
Reviewer Review Type Date Requested Status
Chad Smith Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+373329@code.launchpad.net

Commit message

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

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:4869a1975f701307e71a12788018a54dde022eb3
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1188/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1188//rebuild

review: Approve (continuous-integration)
Revision history for this message
Chad Smith (chad.smith) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
2index 0ad93ff..cf082c7 100644
3--- a/cloudinit/distros/debian.py
4+++ b/cloudinit/distros/debian.py
5@@ -29,9 +29,10 @@ APT_GET_WRAPPER = {
6 'enabled': 'auto',
7 }
8
9-ENI_HEADER = """# This file is generated from information provided by
10-# the datasource. Changes to it will not persist across an instance.
11-# To disable cloud-init's network configuration capabilities, write a file
12+NETWORK_FILE_HEADER = """\
13+# This file is generated from information provided by the datasource. Changes
14+# to it will not persist across an instance reboot. To disable cloud-init's
15+# network configuration capabilities, write a file
16 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
17 # network: {config: disabled}
18 """
19@@ -48,9 +49,9 @@ class Distro(distros.Distro):
20 }
21 renderer_configs = {
22 "eni": {"eni_path": network_conf_fn["eni"],
23- "eni_header": ENI_HEADER},
24+ "eni_header": NETWORK_FILE_HEADER},
25 "netplan": {"netplan_path": network_conf_fn["netplan"],
26- "netplan_header": ENI_HEADER,
27+ "netplan_header": NETWORK_FILE_HEADER,
28 "postcmds": True}
29 }
30
31diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py
32index e5fcbc5..23be3bd 100644
33--- a/cloudinit/distros/ubuntu.py
34+++ b/cloudinit/distros/ubuntu.py
35@@ -30,9 +30,9 @@ class Distro(debian.Distro):
36 }
37 self.renderer_configs = {
38 "eni": {"eni_path": self.network_conf_fn["eni"],
39- "eni_header": debian.ENI_HEADER},
40+ "eni_header": debian.NETWORK_FILE_HEADER},
41 "netplan": {"netplan_path": self.network_conf_fn["netplan"],
42- "netplan_header": debian.ENI_HEADER,
43+ "netplan_header": debian.NETWORK_FILE_HEADER,
44 "postcmds": True}
45 }
46
47diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
48index 07b5c0a..6720995 100644
49--- a/tests/unittests/test_distros/test_netconfig.py
50+++ b/tests/unittests/test_distros/test_netconfig.py
51@@ -91,9 +91,9 @@ V1_NET_CFG = {'config': [{'name': 'eth0',
52 'version': 1}
53
54 V1_NET_CFG_OUTPUT = """\
55-# This file is generated from information provided by
56-# the datasource. Changes to it will not persist across an instance.
57-# To disable cloud-init's network configuration capabilities, write a file
58+# This file is generated from information provided by the datasource. Changes
59+# to it will not persist across an instance reboot. To disable cloud-init's
60+# network configuration capabilities, write a file
61 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
62 # network: {config: disabled}
63 auto lo
64@@ -125,9 +125,9 @@ V1_NET_CFG_IPV6 = {'config': [{'name': 'eth0',
65
66
67 V1_TO_V2_NET_CFG_OUTPUT = """\
68-# This file is generated from information provided by
69-# the datasource. Changes to it will not persist across an instance.
70-# To disable cloud-init's network configuration capabilities, write a file
71+# This file is generated from information provided by the datasource. Changes
72+# to it will not persist across an instance reboot. To disable cloud-init's
73+# network configuration capabilities, write a file
74 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
75 # network: {config: disabled}
76 network:
77@@ -154,9 +154,9 @@ V2_NET_CFG = {
78
79
80 V2_TO_V2_NET_CFG_OUTPUT = """\
81-# This file is generated from information provided by
82-# the datasource. Changes to it will not persist across an instance.
83-# To disable cloud-init's network configuration capabilities, write a file
84+# This file is generated from information provided by the datasource. Changes
85+# to it will not persist across an instance reboot. To disable cloud-init's
86+# network configuration capabilities, write a file
87 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
88 # network: {config: disabled}
89 network:

Subscribers

People subscribed via source and target branches