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

addons: introduces old_ifaceobjs to get_dependent_ifacenames

Other addon modules need to access the list of old ifaceobjs

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2021-07-06 12:46:02 +02:00
parent 15666526bf
commit c2b847f7af
5 changed files with 5 additions and 5 deletions

View File

@@ -188,7 +188,7 @@ class batman_adv(Addon, moduleBase):
return sorted(members)
def get_dependent_ifacenames(self, ifaceobj, ifaceobjs_all=None):
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False):
if not self._is_batman_device(ifaceobj):
return None

View File

@@ -200,7 +200,7 @@ class openvswitch(Addon, moduleBase):
cmd = "del-br %s"%(ifaceobj.name)
self._ovs_vsctl(ifaceobj, [cmd])
def get_dependent_ifacenames (self, ifaceobj, ifaceobjs_all=None):
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False):
if not self._is_ovs_bridge(ifaceobj):
return None
ifaceobj.link_privflags |= ifaceLinkPrivFlags.OPENVSWITCH

View File

@@ -212,7 +212,7 @@ class openvswitch_port(Addon, moduleBase):
self._ovs_vsctl(ifaceobj, [cmd])
def get_dependent_ifacenames (self, ifaceobj, ifaceobjs_all=None):
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False):
if not self._is_ovs_port (ifaceobj):
return None

View File

@@ -112,7 +112,7 @@ class ppp(Addon, moduleBase):
except Exception as e:
self.log_warn(str(e))
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None):
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False):
if not self._is_my_interface(ifaceobj):
return None

View File

@@ -61,7 +61,7 @@ class xfrm(Addon, moduleBase):
Addon.__init__(self)
moduleBase.__init__(self, *args, **kargs)
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None):
def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False):
parent_int = self._get_parent_ifacename(ifaceobj)
if parent_int: