Code Duplication    Length = 12-12 lines in 2 locations

models/evc.py 2 locations

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