Skip to content

Commit 94a092d

Browse files
[DPB] Remove the optimization logic for delete/add ports. (sonic-net#2463)
* Fix port breakout issue * Address comments * fix LGTM alerts
1 parent a588428 commit 94a092d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

config/main.py

-16
Original file line numberDiff line numberDiff line change
@@ -4096,28 +4096,12 @@ def breakout(ctx, interface_name, mode, verbose, force_remove_dependencies, load
40964096
click.secho("[ERROR] port_dict is None!", fg='red')
40974097
raise click.Abort()
40984098

4099-
""" Special Case: Dont delete those ports where the current mode and speed of the parent port
4100-
remains unchanged to limit the traffic impact """
4101-
4102-
click.secho("\nAfter running Logic to limit the impact", fg="cyan", underline=True)
4103-
matched_items = [intf for intf in del_intf_dict if intf in add_intf_dict and del_intf_dict[intf] == add_intf_dict[intf]]
4104-
4105-
# Remove the interface which remains unchanged from both del_intf_dict and add_intf_dict
4106-
for item in matched_items:
4107-
del_intf_dict.pop(item)
4108-
add_intf_dict.pop(item)
4109-
41104099
# validate all del_ports before calling breakOutPort
41114100
for intf in del_intf_dict.keys():
41124101
if not interface_name_is_valid(config_db, intf):
41134102
click.secho("[ERROR] Interface name {} is invalid".format(intf))
41144103
raise click.Abort()
41154104

4116-
click.secho("\nFinal list of ports to be deleted : \n {} \nFinal list of ports to be added : \n {}".format(json.dumps(del_intf_dict, indent=4), json.dumps(add_intf_dict, indent=4), fg='green', blink=True))
4117-
if not add_intf_dict:
4118-
click.secho("[ERROR] add_intf_dict is None or empty! No interfaces are there to be added", fg='red')
4119-
raise click.Abort()
4120-
41214105
port_dict = {}
41224106
for intf in add_intf_dict:
41234107
if intf in add_ports:

0 commit comments

Comments
 (0)