Remove redundant code - remove_interface() already removes TAP cache entries
This commit is contained in:
@ -316,7 +316,6 @@ class Reconciler():
|
|||||||
for ifname in removed_taps:
|
for ifname in removed_taps:
|
||||||
cli = "delete tap %s" % ifname
|
cli = "delete tap %s" % ifname
|
||||||
self.cli['prune'].append(cli)
|
self.cli['prune'].append(cli)
|
||||||
self.vpp.cache_remove_tap(ifname)
|
|
||||||
self.vpp.cache_remove_interface(ifname)
|
self.vpp.cache_remove_interface(ifname)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -105,15 +105,6 @@ class VPPApi():
|
|||||||
self.cache['l2xcs'].pop(iface.sw_if_index, None)
|
self.cache['l2xcs'].pop(iface.sw_if_index, None)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def cache_remove_tap(self, ifname):
|
|
||||||
if not ifname in self.cache['interface_names']:
|
|
||||||
self.logger.warning("Trying to remove a TAP which is not in the config: %s" % ifname)
|
|
||||||
return False
|
|
||||||
|
|
||||||
iface = self.cache['interface_names'][ifname]
|
|
||||||
self.cache['taps'].pop(iface.sw_if_index, None)
|
|
||||||
return True
|
|
||||||
|
|
||||||
def cache_remove_vxlan_tunnel(self, ifname):
|
def cache_remove_vxlan_tunnel(self, ifname):
|
||||||
if not ifname in self.cache['interface_names']:
|
if not ifname in self.cache['interface_names']:
|
||||||
self.logger.warning("Trying to remove a VXLAN Tunnel which is not in the config: %s" % ifname)
|
self.logger.warning("Trying to remove a VXLAN Tunnel which is not in the config: %s" % ifname)
|
||||||
@ -143,7 +134,6 @@ class VPPApi():
|
|||||||
else:
|
else:
|
||||||
del self.cache['bondethernet_members'][iface.sw_if_index]
|
del self.cache['bondethernet_members'][iface.sw_if_index]
|
||||||
self.cache['bondethernets'].pop(iface.sw_if_index, None)
|
self.cache['bondethernets'].pop(iface.sw_if_index, None)
|
||||||
|
|
||||||
self.cache['taps'].pop(iface.sw_if_index, None)
|
self.cache['taps'].pop(iface.sw_if_index, None)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user