mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifreload: fix handling(downing) of builtin interfaces on changes
Ticket: CM-8455 Review: CCR-4181 Testing: tested ifreload on builtin interface change This patch handles removal of builtin interfaces (example swp*.100 below..which dont have iface sections) during a ifreload. {noformat} auto bridge iface bridge bridge-vlan-aware yes bridge-ports swp3.100 swp15.100 {noformat} if user changes swp15.100 to another interface and does a ifreload, before this patch swp15.100 used to be around. This patch makes sure swp15.100 is deleted in the process I had to do some cleanup of flags in the process. I might have added some extra cycles to ifreload. But i dont see an easy way to handle this case.
This commit is contained in:
@@ -316,7 +316,7 @@ class iface():
|
||||
"""iface status str (string representing the status) """
|
||||
self.flags = 0x0
|
||||
"""iface flags """
|
||||
self.priv_flags = 0x0
|
||||
self.priv_flags = None
|
||||
"""iface module flags dictionary with module name: flags"""
|
||||
self.module_flags = {}
|
||||
"""iface priv flags. can be used by the external object manager """
|
||||
@@ -551,7 +551,7 @@ class iface():
|
||||
self.linkstate = None
|
||||
self.env = None
|
||||
self.role = ifaceRole.UNKNOWN
|
||||
self.priv_flags = 0
|
||||
self.priv_flags = None
|
||||
self.module_flags = {}
|
||||
self.raw_config = []
|
||||
self.flags |= self._PICKLED
|
||||
|
Reference in New Issue
Block a user