|
@@ 286-298 (lines=13) @@
|
| 283 |
|
"vlan_id": in_vlan_z} |
| 284 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 285 |
|
|
| 286 |
|
if in_vlan_a not in {"4096/4096", 0, None}: |
| 287 |
|
if in_vlan_z == 0: |
| 288 |
|
new_action = {"action_type": "pop_vlan"} |
| 289 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 290 |
|
elif in_vlan_a == "4096/4096": |
| 291 |
|
if in_vlan_z == 0: |
| 292 |
|
new_action = {"action_type": "pop_vlan"} |
| 293 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 294 |
|
elif not in_vlan_a: |
| 295 |
|
if in_vlan_z not in {"4096/4096", 0, None}: |
| 296 |
|
new_action = {"action_type": "push_vlan", |
| 297 |
|
"tag_type": "c"} |
| 298 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 299 |
|
self.assertEqual(expected_flow_mod, flow_mod) |
| 300 |
|
|
| 301 |
|
@staticmethod |
|
@@ 266-278 (lines=13) @@
|
| 263 |
|
"vlan_id": in_vlan_z} |
| 264 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 265 |
|
|
| 266 |
|
if in_vlan_a not in {"4096/4096", 0, None}: |
| 267 |
|
if in_vlan_z == 0: |
| 268 |
|
new_action = {"action_type": "pop_vlan"} |
| 269 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 270 |
|
elif in_vlan_a == "4096/4096": |
| 271 |
|
if in_vlan_z == 0: |
| 272 |
|
new_action = {"action_type": "pop_vlan"} |
| 273 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 274 |
|
elif not in_vlan_a: |
| 275 |
|
if in_vlan_z not in {"4096/4096", 0, None}: |
| 276 |
|
new_action = {"action_type": "push_vlan", |
| 277 |
|
"tag_type": "c"} |
| 278 |
|
expected_flow_mod["actions"].insert(0, new_action) |
| 279 |
|
self.assertEqual(expected_flow_mod, flow_mod) |
| 280 |
|
|
| 281 |
|
if in_vlan_z not in {"4096/4096", 0, None}: |