Code Duplication    Length = 12-12 lines in 2 locations

models/evc.py 2 locations

@@ 1133-1144 (lines=12) @@
1130
        elif vlan_a == 0 and vlan_z == "4096/4096":
1131
            flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1132
1133
        if not isinstance(vlan_a, list) and vlan_a not in self.special_cases:
1134
            flow_mod_za["actions"].insert(
1135
                    0, {"action_type": "set_vlan", "vlan_id": vlan_a}
1136
                )
1137
            if not vlan_z:
1138
                flow_mod_za["actions"].insert(
1139
                    0, {"action_type": "push_vlan", "tag_type": "c"}
1140
                )
1141
            if vlan_z == 0:
1142
                flow_mod_az["actions"].insert(0, {"action_type": "pop_vlan"})
1143
        elif vlan_a == "4096/4096" and vlan_z == 0:
1144
            flow_mod_az["actions"].insert(0, {"action_type": "pop_vlan"})
1145
1146
        flows = []
1147
        if isinstance(vlan_a, list):
@@ 1120-1131 (lines=12) @@
1117
            self.queue_id, vlan_z
1118
        )
1119
1120
        if not isinstance(vlan_z, list) and vlan_z not in self.special_cases:
1121
            flow_mod_az["actions"].insert(
1122
                0, {"action_type": "set_vlan", "vlan_id": vlan_z}
1123
            )
1124
            if not vlan_a:
1125
                flow_mod_az["actions"].insert(
1126
                    0, {"action_type": "push_vlan", "tag_type": "c"}
1127
                )
1128
            if vlan_a == 0:
1129
                flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1130
        elif vlan_a == 0 and vlan_z == "4096/4096":
1131
            flow_mod_za["actions"].insert(0, {"action_type": "pop_vlan"})
1132
1133
        if not isinstance(vlan_a, list) and vlan_a not in self.special_cases:
1134
            flow_mod_za["actions"].insert(