Code Duplication    Length = 12-12 lines in 2 locations

models/evc.py 2 locations

@@ 1009-1020 (lines=12) @@
1006
        elif vlan_a == 0 and vlan_z == "4096/4096":
1007
            flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1008
1009
        if not isinstance(vlan_a, list) and vlan_a not in self.special_cases:
1010
            flow_mod_za["actions"].insert(
1011
                    0, {"action_type": "set_vlan", "vlan_id": vlan_a}
1012
                )
1013
            if not vlan_z:
1014
                flow_mod_za["actions"].insert(
1015
                    0, {"action_type": "push_vlan", "tag_type": "c"}
1016
                )
1017
            if vlan_z == 0:
1018
                flow_mod_az["actions"].insert(0, {"action_type": "pop_vlan"})
1019
        elif vlan_a == "4096/4096" and vlan_z == 0:
1020
            flow_mod_az["actions"].insert(0, {"action_type": "pop_vlan"})
1021
1022
        flows = []
1023
        if isinstance(vlan_a, list):
@@ 996-1007 (lines=12) @@
993
            self.queue_id, vlan_z
994
        )
995
996
        if not isinstance(vlan_z, list) and vlan_z not in self.special_cases:
997
            flow_mod_az["actions"].insert(
998
                0, {"action_type": "set_vlan", "vlan_id": vlan_z}
999
            )
1000
            if not vlan_a:
1001
                flow_mod_az["actions"].insert(
1002
                    0, {"action_type": "push_vlan", "tag_type": "c"}
1003
                )
1004
            if vlan_a == 0:
1005
                flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1006
        elif vlan_a == 0 and vlan_z == "4096/4096":
1007
            flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1008
1009
        if not isinstance(vlan_a, list) and vlan_a not in self.special_cases:
1010
            flow_mod_za["actions"].insert(