summaryrefslogtreecommitdiffstats
path: root/core/vnf_controller_p2p.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/vnf_controller_p2p.py')
-rw-r--r--core/vnf_controller_p2p.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/vnf_controller_p2p.py b/core/vnf_controller_p2p.py
index 60161480..a881d345 100644
--- a/core/vnf_controller_p2p.py
+++ b/core/vnf_controller_p2p.py
@@ -56,3 +56,9 @@ class VnfControllerP2P(IVnfController):
"""Stops nothing.
"""
self._logger.debug('stop with ' + str(self._vnf_class))
+
+ def __enter__(self):
+ self.start()
+
+ def __exit__(self, type_, value, traceback):
+ self.stop()