Skip to content

Commit

Permalink
+ added comment for the change in 'sort_port_by_index' API
Browse files Browse the repository at this point in the history
  • Loading branch information
smaheshm committed Jul 23, 2020
1 parent 383de5f commit ed754d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def sort_by_port_index(value):
if not value:
return
if isinstance(value, list):
# In multi-ASIC platforms backend ethernet ports are identified as
# 'Ethernet-BPxy'. Add 1024 to sort backend ports to the end.
value.sort(
key = lambda k: int(k[8:]) if "BP" not in k else int(k[11:]) + 1024
)
Expand Down

0 comments on commit ed754d8

Please sign in to comment.