1
0
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:
Nikhil
2016-03-02 13:07:11 -08:00
parent 659097a03b
commit 867e11a242

View File

@@ -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: