Remove hardcoded flow parameters from
'_build_flow_expr_str' method, so we can
define any flows we want and can rely on 'ovs-ofctl'
command to verify flow arguments correctness.
When building flow string inside _build_flow_expr_str
use the following approach:
1. Build prefix and remove prefix params from flow_dict.
2. Build postfix (actions) and remove 'actions' from
flow dict.
3. Inside the loop build flow array from everything
what's left in flow_dict.
4. Append postfix (actions) to the flow array.
5. 'Join' flow array into flow string.
Change _build_flow_expr_str() to be a function
instead of an object method because 'self'
parameter wasn't used.
Remove 'add_or_mod_flow_str' method because
we have to use separate logic when bulding flow
strings for 'add_flow' and 'mod_flow' methods.
Reviewed: https:/ /review. openstack. org/58533 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=3c00dd43f61 3c838f713a7cbf3 cedb6767a8c52a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3c00dd43f613c83 8f713a7cbf3cedb 6767a8c52a
Author: Aleks Chirko <email address hidden>
Date: Tue Nov 26 16:22:57 2013 +0200
Bugfix and refactoring for ovs_lib flow methods
Remove hardcoded flow parameters from flow_expr_ str' method, so we can flow_expr_ str
'_build_
define any flows we want and can rely on 'ovs-ofctl'
command to verify flow arguments correctness.
When building flow string inside _build_
use the following approach:
1. Build prefix and remove prefix params from flow_dict.
2. Build postfix (actions) and remove 'actions' from
flow dict.
3. Inside the loop build flow array from everything
what's left in flow_dict.
4. Append postfix (actions) to the flow array.
5. 'Join' flow array into flow string.
Change _build_ flow_expr_ str() to be a function
instead of an object method because 'self'
parameter wasn't used.
Remove 'add_or_ mod_flow_ str' method because
we have to use separate logic when bulding flow
strings for 'add_flow' and 'mod_flow' methods.
Add more unit tests for OVSBridge class.
Closes-Bug: #1255058
Closes-Bug: #1240572
Change-Id: Ic89221d006a626 aa2fc40314a9acf fc0ea6fd61c