2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

ovs-tcpdump: destroy_mirror should really destroy the mirror.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
nickcooper-zhangtonghao
2016-11-14 01:24:13 -08:00
committed by Ben Pfaff
parent b47d91a740
commit efeb3e44b2

View File

@@ -230,7 +230,8 @@ class OVSDB(object):
(port_name, txn.get_error()))
self._txn = None
def destroy_mirror(self, mirror_name, bridge_name):
def destroy_mirror(self, intf_name, bridge_name):
mirror_name = 'm_%s' % intf_name
if not self.mirror_exists(mirror_name):
return
txn = self._start_txn()
@@ -433,7 +434,7 @@ def main():
raise KeyboardInterrupt
except KeyboardInterrupt:
pipes.terminate()
ovsdb.destroy_mirror('m%s' % interface, ovsdb.port_bridge(interface))
ovsdb.destroy_mirror(interface, ovsdb.port_bridge(interface))
ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
except Exception:
print("Unable to tear down the ports and mirrors.")