vnfs: Enable PVP using vhost-user
[vswitchperf.git] / core / vnf_controller_p2p.py
index 6016148..a881d34 100644 (file)
@@ -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()