From 5cf44d7847b085c5fc881c9eb39bcf6bc891e0d9 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 23 Mar 2016 14:29:22 -0400 Subject: add the implementation for read_kernel_cmdline_config --- cloudinit/net/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cloudinit/net/__init__.py') 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 -- cgit v1.2.3