Skip to content

Commit

Permalink
[Chassis]: filter inband and recirc ports as internal ports (#11764)
Browse files Browse the repository at this point in the history
Why I did it
Currently the CLI commands show interface status show interface counters and show interface description displays Ethernet-IB and Ethernet-Rec ports in the output. These are internal ports should only be displayed when the option -d all is used for the above mentioned CLI commands

How I did it
Add the port roles Inb and Rec when classifing a port as internal port.

How to verify it
Verify the CLI output of the command show interface status doesnt display the Ethenet-IB and Ethernet-Rec port when -d all option in not present
Before

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
  • Loading branch information
arlakshm authored and yxieca committed Sep 1, 2022
1 parent f24a73b commit 1f9321a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sonic-py-common/sonic_py_common/multi_asic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
FABRIC_ASIC_SUB_ROLE = 'Fabric'
EXTERNAL_PORT = 'Ext'
INTERNAL_PORT = 'Int'
INBAND_PORT = 'Inb'
RECIRC_PORT ='Rec'
PORT_CHANNEL_CFG_DB_TABLE = 'PORTCHANNEL'
PORT_CFG_DB_TABLE = 'PORT'
BGP_NEIGH_CFG_DB_TABLE = 'BGP_NEIGHBOR'
Expand Down Expand Up @@ -327,7 +329,7 @@ def is_port_internal(port_name, namespace=None):

role = get_port_role(port_name, namespace)

if role == INTERNAL_PORT:
if role in [INTERNAL_PORT, INBAND_PORT, RECIRC_PORT]:
return True

return False
Expand Down

0 comments on commit 1f9321a

Please sign in to comment.