mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vrf: avoids ifupdown2 error when VRF defined but not used
Ticket: CM-9596 Reviewed By: Roopa Prabhu Testing Done: Yes, by installing ifupdown2 deb onto cel-e1031-01 This patch makes sure ifupdown2 will not report a NoneType error when VRF is defined but not used
This commit is contained in:
@@ -240,7 +240,8 @@ class vrf(moduleBase):
|
||||
def _add_vrf_slaves(self, ifaceobj):
|
||||
running_slaves = self.ipcmd.link_get_lowers(ifaceobj.name)
|
||||
config_slaves = ifaceobj.lowerifaces
|
||||
|
||||
if not config_slaves or not running_slaves:
|
||||
return
|
||||
add_slaves = set(config_slaves).difference(set(running_slaves))
|
||||
del_slaves = set(running_slaves).difference(set(config_slaves))
|
||||
if add_slaves:
|
||||
|
||||
Reference in New Issue
Block a user