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:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user