aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches/ovs.py
diff options
context:
space:
mode:
authorSridhar Rao <sridhar.rao@spirent.com>2018-04-26 03:37:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-26 03:37:44 +0000
commit446e4c14c7f91b797a338db94b9bcb32b1c7d229 (patch)
tree12af38ae71bc4f1855fbc61dd98faa18aa3e04f3 /vswitches/ovs.py
parent7440717327dabe7ae37f99cb060bce43a7878096 (diff)
parent217fa855dcfdc2fc74d556a5620ce6aeb66af007 (diff)
Merge "vswitches/ovs: delete bridges on stop"
Diffstat (limited to 'vswitches/ovs.py')
-rw-r--r--vswitches/ovs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/vswitches/ovs.py b/vswitches/ovs.py
index 9e49b2ee..6f650005 100644
--- a/vswitches/ovs.py
+++ b/vswitches/ovs.py
@@ -128,6 +128,8 @@ class IVSwitchOvs(IVSwitch, tasks.Process):
def stop(self):
"""See IVswitch for general description
"""
+ for switch_name in list(self._bridges):
+ self.del_switch(switch_name)
self._logger.info("Terminating vswitchd...")
self.kill()
self._bridges = {}
@@ -147,6 +149,8 @@ class IVSwitchOvs(IVSwitch, tasks.Process):
"""See IVswitch for general description
"""
bridge = self._bridges[switch_name]
+ for port in list(bridge.get_ports()):
+ bridge.del_port(port)
self._bridges.pop(switch_name)
bridge.destroy()