Diff comments:
> diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py
> index 556a10f..c05d36c 100755
> --- a/cloudinit/net/cmdline.py
> +++ b/cloudinit/net/cmdline.py
> @@ -137,6 +203,24 @@ def config_from_klibc_net_cfg(files=None,
> mac_addrs=None):
> return {'config': entries, 'version': 1}
>
>
> +def read_initramfs_config():
> + """
> + Return v1 network config for initramfs-configured networking (or None)
remove v1; that'll be initramfs-config obj method specific. In practice it is
but
that can change.
> +
> + This will consider each _INITRAMFS_CONFIG_SOURCES entry in turn, and
> return
> + v1 network configuration for the first one that is applicable. If none
> are
> + applicable, return None.
> + """
> + for src_cls in _INITRAMFS_CONFIG_SOURCES:
Hrm, how we are going to distinguish the klibc one from dracut where the user
has passed an ip= parameter?
https://fedoraproject.org/wiki/Dracut/Options#Network suggests that it also
handles the same parameters as kblic will.
I suspect we'll want/need some what to positively identify which
initramfs_config_sources are present via some
distro specific path/tool/exec and include that in the applicable check such
that even if using ip=, the
klibc source won't be used since it's not on the right distro.
> + cfg_source = src_cls()
> +
> + if not cfg_source.is_applicable():
> + continue
> +
> + return cfg_source.render_config()
> + return None
> +
> +
> def _decomp_gzip(blob, strict=True):
> # decompress blob. raise exception if not compressed unless strict=False.
> with io.BytesIO(blob) as iobuf:
--
https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/371673
Your team cloud-init commiters is requested to review the proposed merge of
~daniel-thewatkins/cloud-init/+git/cloud-init:dracut into cloud-init:master.
_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help : https://help.launchpad.net/ListHelp