diff options
author | Anh Vo <anhvo@microsoft.com> | 2020-10-13 15:42:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 15:42:54 -0400 |
commit | 8ec8c3fc63a59b85888a0b52356b784314a1d4cc (patch) | |
tree | 51006af28392ee2f1cad61e2887e1d6851d8f8d5 /cloudinit/distros | |
parent | 5bf287f430b97860bf746e61b83ff53b834592d0 (diff) | |
download | vyos-cloud-init-8ec8c3fc63a59b85888a0b52356b784314a1d4cc.tar.gz vyos-cloud-init-8ec8c3fc63a59b85888a0b52356b784314a1d4cc.zip |
net: add the ability to blacklist network interfaces based on driver during enumeration of physical network devices (#591)
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/networking.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/distros/networking.py b/cloudinit/distros/networking.py index 10ed249d..e407fa29 100644 --- a/cloudinit/distros/networking.py +++ b/cloudinit/distros/networking.py @@ -22,6 +22,9 @@ class Networking(metaclass=abc.ABCMeta): Hierarchy" in HACKING.rst for full details. """ + def __init__(self): + self.blacklist_drivers = None + def _get_current_rename_info(self) -> dict: return net._get_current_rename_info() @@ -68,7 +71,8 @@ class Networking(metaclass=abc.ABCMeta): return net.get_interfaces() def get_interfaces_by_mac(self) -> dict: - return net.get_interfaces_by_mac() + return net.get_interfaces_by_mac( + blacklist_drivers=self.blacklist_drivers) def get_master(self, devname: DeviceName): return net.get_master(devname) |