X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vswitches%2Fovs.py;h=be7b77dfa8fa19551e84610dd19d47bb9a5a6606;hb=7820695ec10db06f7f486902ef3ef04b2bc40da3;hp=9e49b2ee6f49e8446e8e76e3b8911f84e336f69b;hpb=0236fe345f85faf5e07fae683106021c97490720;p=vswitchperf.git diff --git a/vswitches/ovs.py b/vswitches/ovs.py index 9e49b2ee..be7b77df 100644 --- a/vswitches/ovs.py +++ b/vswitches/ovs.py @@ -1,4 +1,4 @@ -# Copyright 2015-2017 Intel Corporation. +# Copyright 2015-2018 Intel Corporation, Tieto and Others. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -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,9 @@ class IVSwitchOvs(IVSwitch, tasks.Process): """See IVswitch for general description """ bridge = self._bridges[switch_name] + bridge.del_flow({}) + for port in list(bridge.get_ports()): + bridge.del_port(port) self._bridges.pop(switch_name) bridge.destroy()