Adjust priority to collapse flows
Change-Id: I41ff03788f0d9483bbdd33808c42d42dc52c248b
diff --git a/tests/utests/voltha/core/test_logical_device_agent.py b/tests/utests/voltha/core/test_logical_device_agent.py
index 87d888d..7b2cbce 100644
--- a/tests/utests/voltha/core/test_logical_device_agent.py
+++ b/tests/utests/voltha/core/test_logical_device_agent.py
@@ -714,8 +714,8 @@
# now check device level flows
self.assertEqual(len(self.device_flows['olt'].items), 8)
- self.assertEqual(len(self.device_flows['onu1'].items), 6)
- self.assertEqual(len(self.device_flows['onu2'].items), 6)
+ self.assertEqual(len(self.device_flows['onu1'].items), 5)
+ self.assertEqual(len(self.device_flows['onu2'].items), 5)
self.assertEqual(len(self.device_groups['olt'].items), 0)
self.assertEqual(len(self.device_groups['onu1'].items), 0)
self.assertEqual(len(self.device_groups['onu2'].items), 0)
@@ -770,7 +770,7 @@
# Flows installed on the ONU1
self.assertFlowsEqual(self.device_flows['onu1'].items[0], mk_flow_stat(
- priority=1000,
+ priority=500,
match_fields=[in_port(0), vlan_vid(4096 + 0)],
actions=[
set_field(vlan_vid(4096 + 101)), output(1)]
@@ -792,11 +792,6 @@
))
self.assertFlowsEqual(self.device_flows['onu1'].items[4], mk_flow_stat(
priority=500,
- match_fields=[in_port(0), vlan_vid(4096 + 0)],
- actions=[set_field(vlan_vid(4096 + 101)), output(1)]
- ))
- self.assertFlowsEqual(self.device_flows['onu1'].items[5], mk_flow_stat(
- priority=500,
match_fields=[in_port(0), vlan_vid(0)],
actions=[push_vlan(0x8100), set_field(vlan_vid(4096 + 101)),
output(1)]
@@ -804,7 +799,7 @@
# Flows installed on the ONU2
self.assertFlowsEqual(self.device_flows['onu2'].items[0], mk_flow_stat(
- priority=1000,
+ priority=500,
match_fields=[in_port(0), vlan_vid(4096 + 0)],
actions=[
set_field(vlan_vid(4096 + 102)), output(1)]
@@ -826,11 +821,6 @@
))
self.assertFlowsEqual(self.device_flows['onu2'].items[4], mk_flow_stat(
priority=500,
- match_fields=[in_port(0), vlan_vid(4096 + 0)],
- actions=[set_field(vlan_vid(4096 + 102)), output(1)]
- ))
- self.assertFlowsEqual(self.device_flows['onu2'].items[5], mk_flow_stat(
- priority=500,
match_fields=[in_port(0), vlan_vid(0)],
actions=[push_vlan(0x8100), set_field(vlan_vid(4096 + 102)),
output(1)]
diff --git a/voltha/core/logical_device_agent.py b/voltha/core/logical_device_agent.py
index 11266db..817ee60 100644
--- a/voltha/core/logical_device_agent.py
+++ b/voltha/core/logical_device_agent.py
@@ -563,7 +563,7 @@
assert len(downstream_ports) == 1
flows = OrderedDict((f.id, f) for f in [
mk_flow_stat(
- priority=1000,
+ priority=500,
match_fields=[
in_port(downstream_ports[0].port_no),
vlan_vid(ofp.OFPVID_PRESENT | 0)