1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdownmain: skip bridge vlan when checking running config

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2021-04-07 00:20:23 +02:00
parent e3dbe405ba
commit 20e8d38375

View File

@ -1869,9 +1869,15 @@ class ifupdownMain:
auto = False
break
if not ifupdownflags.flags.DRYRUN and auto and not os.path.exists("/sys/class/net/%s" % ifname):
if not ifupdownflags.flags.DRYRUN and auto and not os.path.exists("/sys/class/net/%s" % ifname) and not self._is_ifaceobj_bridge_vlan(ifaceobj_list):
self.logger.warning("%s: interface not recognized - please check interface configuration" % ifname)
def _is_ifaceobj_bridge_vlan(self, ifaceobj_list):
for ifaceobj in ifaceobj_list:
if ifaceobj.type == ifaceType.BRIDGE_VLAN:
return True
return False
def _get_filtered_ifacenames_with_classes(self, auto, allow_classes, excludepats, ifacenames):
# if user has specified ifacelist and allow_classes
# append the allow_classes interfaces to user