From 65228e39e95921087cd95782d50f482b8041311c Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Mon, 13 Dec 2021 03:09:51 +0100 Subject: [PATCH] [sonic-py-common] Add recirc_prefix definition (#9471) This interface type is used for recirculation on chassis. The definition is required to prevent this interface from being considered a physical interface in sonic-platform-common and sonic-platform-daemon --- src/sonic-py-common/sonic_py_common/interface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sonic-py-common/sonic_py_common/interface.py b/src/sonic-py-common/sonic_py_common/interface.py index 59aeacf013..286f28e531 100644 --- a/src/sonic-py-common/sonic_py_common/interface.py +++ b/src/sonic-py-common/sonic_py_common/interface.py @@ -15,6 +15,7 @@ SONIC_INTERFACE_PREFIXES = { "Loopback": "Loopback", "Ethernet-Backplane": "Ethernet-BP", "Ethernet-Inband": "Ethernet-IB", + "Ethernet-Recirc": "Ethernet-Rec", "Ethernet-SubPort": "Eth", "PortChannel-SubPort": "Po" } @@ -57,6 +58,12 @@ def inband_prefix(): """ return SONIC_INTERFACE_PREFIXES["Ethernet-Inband"] +def recirc_prefix(): + """ + Retrieves the SONIC recirculation port interface name prefix. + """ + return SONIC_INTERFACE_PREFIXES["Ethernet-Recirc"] + def physical_subinterface_prefix(): """ Retrieves the SONIC Subinterface name prefix.