bugfix: do not report DPDK version for vanilla OVS vswitch
[vswitchperf.git] / vswitches / vswitch.py
index 713974a..a28c0f6 100644 (file)
@@ -36,10 +36,12 @@ class IVSwitch(object):
         """
         raise NotImplementedError()
 
-    def add_switch(self, switch_name):
+    def add_switch(self, switch_name, params):
         """Create a new logical switch with no ports
 
         :param switch_name: The name of the new logical switch
+        :param params: Optional parameters to configure switch
+
         :returns: None
         """
         raise NotImplementedError()
@@ -87,11 +89,18 @@ class IVSwitch(object):
         """
         raise NotImplementedError()
 
-    def add_flow(self, switch_name, flow):
+    def add_flow(self, switch_name, flow, cache='off'):
         """Add a flow rule to the logical switch
 
         :param switch_name: The switch on which to operate
         :param flow: Flow description as a dictionary
+        :param cache: Optional. Specifies if flow should be inserted
+            to the switch or cached to increase performance during manipulation
+            with large number of flows.
+            Values:
+                'off'   - cache is off and flow is inserted directly to the switch
+                'on'    - cache is on and flow is inserted into the cache
+                'flush' - cache content will be inserted into the switch
 
         Example flow dictionary:
             flow = {
@@ -112,3 +121,10 @@ class IVSwitch(object):
         For flow==None, all flows are deleted
         """
         raise NotImplementedError()
+
+    def dump_flows(self, switch_name):
+        """Dump flows from the logical switch
+
+        :param switch_name: The switch on which to operate
+        """
+        raise NotImplementedError()