summaryrefslogtreecommitdiffstats
path: root/vswitches/vswitch.py
diff options
context:
space:
mode:
Diffstat (limited to 'vswitches/vswitch.py')
-rw-r--r--vswitches/vswitch.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/vswitches/vswitch.py b/vswitches/vswitch.py
index fbec861a..a28c0f6b 100644
--- a/vswitches/vswitch.py
+++ b/vswitches/vswitch.py
@@ -89,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 = {