make applying changes less jarring for virtual devices

This commit is contained in:
Michael Hudson-Doyle 2019-03-26 10:13:09 +13:00
parent 23488a6f2e
commit 099e658670
1 changed files with 4 additions and 0 deletions

View File

@ -292,6 +292,10 @@ class NetworkView(BaseView):
log.debug(
"del_link %s %s %s",
dev.name, dev.ifindex, (dev in self.cur_netdevs))
# If a virtual device disappears while we still have config
# for it, we assume it will be back soon.
if dev.is_virtual and dev.config is not None:
return
if dev in self.cur_netdevs:
netdev_i = self.cur_netdevs.index(dev)
self._remove_row(netdev_i+1)