Commit 3cb85b6
committed
Rework traffic-rules
Previous implementation did not take how VLANs are configured into
account, this lead to a pretty hefty change.
VLANs use a fake bridge, which is then included in a parent bridge.
While packets remain within this bridge, they are not tagged, so the
vlanid cannot be used to match packets in the OVS datapath. The only
workaround is to create rules for each port. However, this means that
rules for untagged traffic, as previously implemented, will also apply
to VLAN ports. Therefore, we must apply rules to each matching port in
all cases, and create a rule on the uplink ports that matches
accordingly.
Changes summary:
- Refactored to improve clarity and error handling
- Added update_args_from_ovs() to dynamically gather bridge, VLAN, and port info from OVS.
- Changed ip_range to ipRange that XO plugin is using
- Replaced single rule building with per-port rule, as well as matching on VLAN for uplink ports
- Updated tests to match the refactor
- Added tests for update_args_from_ovs()
- Mocked OVS command calls in tests for more accurate validation.
Signed-off-by: David Morel <david.morel@vates.tech>1 parent f9a0d07 commit 3cb85b6
File tree
4 files changed
+1065
-682
lines changed- SOURCES/etc/xapi.d/plugins
- tests
- sdncontroller_test_cases
4 files changed
+1065
-682
lines changed
0 commit comments