From b7aa69595f9d229ddfa8d6a08ad27e43dbb3bf7a Mon Sep 17 00:00:00 2001 From: arlakshm <55814491+arlakshm@users.noreply.github.com> Date: Tue, 23 Aug 2022 13:40:54 -0700 Subject: [PATCH] [Chassis]: filter inband and recirc ports as internal ports (#11764) 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 --- src/sonic-py-common/sonic_py_common/multi_asic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sonic-py-common/sonic_py_common/multi_asic.py b/src/sonic-py-common/sonic_py_common/multi_asic.py index e08746be03..e03dc6447c 100644 --- a/src/sonic-py-common/sonic_py_common/multi_asic.py +++ b/src/sonic-py-common/sonic_py_common/multi_asic.py @@ -15,6 +15,8 @@ FRONTEND_ASIC_SUB_ROLE = 'FrontEnd' BACKEND_ASIC_SUB_ROLE = 'BackEnd' 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' @@ -323,7 +325,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