1
0
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:
Roopa Prabhu
2016-02-25 17:10:33 -08:00
parent 7b2469dbf3
commit dbc018d39d
3 changed files with 132 additions and 77 deletions

View File

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