summaryrefslogtreecommitdiff
path: root/cloudinit/distros/debian.py
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-03-11 21:20:58 +0200
committerzsdc <taras@vyos.io>2020-03-11 21:22:23 +0200
commitc6627bc05a57645e6af8b9a5a67e452d9f37e487 (patch)
treeb754b3991e5e57a9ae9155819f73fa0cbd4be269 /cloudinit/distros/debian.py
parentca9a4eb26b41c204d1bd3a15586b14a5dde950bb (diff)
parent13e82554728b1cb524438163784e5b955c7c5ed0 (diff)
downloadvyos-cloud-init-c6627bc05a57645e6af8b9a5a67e452d9f37e487.tar.gz
vyos-cloud-init-c6627bc05a57645e6af8b9a5a67e452d9f37e487.zip
Cloud-init: T2117: Updated to 20.1
- Merge 20.1 version from the Canonical repository - Removed unneeded changes in datasources (now only OVF datasource is not equal to upstream's version) - Adapted cc_vyos module to new Cloud-init version - Changed Jenkinsfile to use build scripts, provided by upstream
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r--cloudinit/distros/debian.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 0ad93ffe..128bb523 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}
}
@@ -204,8 +205,7 @@ class Distro(distros.Distro):
["update"], freq=PER_INSTANCE)
def get_primary_arch(self):
- (arch, _err) = util.subp(['dpkg', '--print-architecture'])
- return str(arch).strip()
+ return util.get_dpkg_architecture()
def _get_wrapper_prefix(cmd, mode):