From 594e21afa46ebcbaeb32132f270fa9cff8cd3c1d Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Tue, 12 Apr 2022 10:47:45 +0000 Subject: [PATCH] Remove redundant code - remove_interface() already removes TAP cache entries --- vpp/reconciler.py | 1 - vpp/vppapi.py | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/vpp/reconciler.py b/vpp/reconciler.py index 495930e..9520661 100644 --- a/vpp/reconciler.py +++ b/vpp/reconciler.py @@ -316,7 +316,6 @@ class Reconciler(): for ifname in removed_taps: cli = "delete tap %s" % ifname self.cli['prune'].append(cli) - self.vpp.cache_remove_tap(ifname) self.vpp.cache_remove_interface(ifname) return True diff --git a/vpp/vppapi.py b/vpp/vppapi.py index 78c81ee..7e06c57 100644 --- a/vpp/vppapi.py +++ b/vpp/vppapi.py @@ -105,15 +105,6 @@ class VPPApi(): self.cache['l2xcs'].pop(iface.sw_if_index, None) 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): 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) @@ -143,7 +134,6 @@ class VPPApi(): else: del self.cache['bondethernet_members'][iface.sw_if_index] self.cache['bondethernets'].pop(iface.sw_if_index, None) - self.cache['taps'].pop(iface.sw_if_index, None) return True