diff options
author | Julien Meunier <julien.meunier@6wind.com> | 2018-04-12 09:39:27 +0200 |
---|---|---|
committer | Julien Meunier <julien.meunier@6wind.com> | 2018-04-19 09:58:12 +0200 |
commit | 217fa855dcfdc2fc74d556a5620ce6aeb66af007 (patch) | |
tree | 2b59dec46cc39af1a058b8161d51d9fe26826bf9 /src/ovs | |
parent | be271aef854887fce72d821a8589dfd4ebbe8e1d (diff) |
vswitches/ovs: delete bridges on stop
On stop, remove all created bridges in order to clean the working
environment.
Moreover, when an OVS bridge is deleted, remove also all attached ports.
By the way, as the context manager of OFBridge is never used by the
current test implementation and by any OVS vswitches in order to manage
their creation/deletion, let's remove this dead code.
JIRA: VSPERF-570
Change-Id: I7ce62d56a8a2fe7b45e693f3c2dd91e1b435567c
Signed-off-by: Julien Meunier <julien.meunier@6wind.com>
Diffstat (limited to 'src/ovs')
-rw-r--r-- | src/ovs/ofctl.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py index b023e080..21da850a 100644 --- a/src/ovs/ofctl.py +++ b/src/ovs/ofctl.py @@ -156,21 +156,6 @@ class OFBridge(OFBase): self._ports = {} self._cache_file = None - # context manager - - def __enter__(self): - """Create datapath - - :returns: self - """ - return self - - def __exit__(self, type_, value, traceback): - """Remove datapath. - """ - if not traceback: - self.destroy() - # helpers def run_ofctl(self, args, check_error=False, timeout=None): |