Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cloudinit/net/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ def __init__(self, _files=None, _mac_addrs=None, _cmdline=None):
self._mac_addrs[k] = mac_addr

def is_applicable(self) -> bool:
"""
Return whether this system has klibc initramfs network config or not
"""Return whether this system has klibc initramfs network config."""

if is_applicable := self._is_applicable():
LOG.debug("Using initramfs network config from klibc")
return is_applicable

def _is_applicable(self) -> bool:
"""
Will return True if:
(a) klibc files exist in /run, AND
(b) either:
Expand Down
4 changes: 2 additions & 2 deletions cloudinit/sources/DataSourceOracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class KlibcOracleNetworkConfigSource(cmdline.KlibcNetworkConfigSource):
`/run/initramfs/open-iscsi.interface` does not exist.
"""

def is_applicable(self) -> bool:
"""Override is_applicable"""
def _is_applicable(self) -> bool:
"""Override _is_applicable"""
return bool(self._files)


Expand Down
Loading