X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=core%2Fvswitch_controller.py;h=855de8b291c6a59bd1e538c4a485824a1fef06a9;hb=485ac777fd9cded7c145917bfcbe701276f3c855;hp=1caf94fb505736ac1530e5550483360f683c9f08;hpb=8d6777df09c3dc441013a31f21cc50ab3b0f42a3;p=vswitchperf.git diff --git a/core/vswitch_controller.py b/core/vswitch_controller.py index 1caf94fb..855de8b2 100644 --- a/core/vswitch_controller.py +++ b/core/vswitch_controller.py @@ -20,12 +20,13 @@ class IVswitchController(object): This interface is used to setup and control a vSwitch provider for a particular deployment scenario. """ - def setup(self): + def __enter__(self): """Sets up the switch for the particular deployment scenario """ raise NotImplementedError( "The VswitchController does not implement the \"setup\" function.") - def stop(self): + + def __exit__(self, type_, value, traceback): """Tears down the switch created in setup() """ raise NotImplementedError( @@ -48,3 +49,10 @@ class IVswitchController(object): raise NotImplementedError( "The VswitchController does not implement the \"get_ports_info\" " "function.") + + def dump_vswitch_flows(self): + """ Dumps flows from vswitch + """ + raise NotImplementedError( + "The VswitchController does not implement the " + "\"dump_vswitch_flows\" function.")