X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=core%2Fvswitch_controller.py;h=855de8b291c6a59bd1e538c4a485824a1fef06a9;hb=9b590e2282714e3b5aae26c3ac2d8c857b1ddb82;hp=1caf94fb505736ac1530e5550483360f683c9f08;hpb=0d212ded93dfd7f0b7868d00a1ed01270d55063b;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.")