summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-23 14:29:22 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-23 14:29:22 -0400
commit5cf44d7847b085c5fc881c9eb39bcf6bc891e0d9 (patch)
treee109c755db48aaa0cecb0086a2c148ad20f965c6 /cloudinit
parent3791d25694444fe49e026a575b556117a1ea99c3 (diff)
downloadvyos-cloud-init-5cf44d7847b085c5fc881c9eb39bcf6bc891e0d9.tar.gz
vyos-cloud-init-5cf44d7847b085c5fc881c9eb39bcf6bc891e0d9.zip
add the implementation for read_kernel_cmdline_config
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/net/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index a167c0a1..9f5a7fd7 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -647,9 +647,11 @@ def generate_fallback_config():
return nconf
-def read_kernel_cmdline_config():
- # FIXME: add implementation here
- return None
+def read_kernel_cmdline_config(files=None, mac_addrs=None):
+ if mac_addrs is None:
+ mac_addrs = {k: sys_netdev_info(k, 'address')
+ for k in get_devicelist()}
+ return config_from_klibc_net_cfg(files=files, mac_addrs=mac_addrs)
# vi: ts=4 expandtab syntax=python