[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
This commit is contained in:
Samuel Angebault 2021-12-13 03:09:51 +01:00 committed by GitHub
parent cf4011d526
commit 6cf06637f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ SONIC_INTERFACE_PREFIXES = {
"Loopback": "Loopback", "Loopback": "Loopback",
"Ethernet-Backplane": "Ethernet-BP", "Ethernet-Backplane": "Ethernet-BP",
"Ethernet-Inband": "Ethernet-IB", "Ethernet-Inband": "Ethernet-IB",
"Ethernet-Recirc": "Ethernet-Rec",
"Ethernet-SubPort": "Eth", "Ethernet-SubPort": "Eth",
"PortChannel-SubPort": "Po" "PortChannel-SubPort": "Po"
} }
@ -57,6 +58,12 @@ def inband_prefix():
""" """
return SONIC_INTERFACE_PREFIXES["Ethernet-Inband"] 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(): def physical_subinterface_prefix():
""" """
Retrieves the SONIC Subinterface name prefix. Retrieves the SONIC Subinterface name prefix.