From abaebb4d1eac67aafb1990128c8e105361c83e63 Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Tue, 2 Jun 2026 15:25:34 +0200 Subject: [PATCH] Add sonic port_config file for DellEMC-S5212f-P-25G Add a list of supported vendors and make the unit test check against that vendor list. Signed-off-by: Dr. Jens Harbott --- files/sonic/port_config/DellEMC-S5212f-P-25G.ini | 16 ++++++++++++++++ osism/tasks/conductor/sonic/constants.py | 7 +++++++ .../unit/tasks/conductor/sonic/test_constants.py | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 files/sonic/port_config/DellEMC-S5212f-P-25G.ini diff --git a/files/sonic/port_config/DellEMC-S5212f-P-25G.ini b/files/sonic/port_config/DellEMC-S5212f-P-25G.ini new file mode 100644 index 00000000..8e2024fa --- /dev/null +++ b/files/sonic/port_config/DellEMC-S5212f-P-25G.ini @@ -0,0 +1,16 @@ +# name lanes alias index speed +Ethernet0 29 twentyfiveGigE1/1 1 25000 +Ethernet1 30 twentyfiveGigE1/2 2 25000 +Ethernet2 31 twentyfiveGigE1/3 3 25000 +Ethernet3 32 twentyfiveGigE1/4 4 25000 +Ethernet4 33 twentyfiveGigE1/5 5 25000 +Ethernet5 34 twentyfiveGigE1/6 6 25000 +Ethernet6 35 twentyfiveGigE1/7 7 25000 +Ethernet7 36 twentyfiveGigE1/8 8 25000 +Ethernet8 37 twentyfiveGigE1/9 9 25000 +Ethernet9 38 twentyfiveGigE1/10 10 25000 +Ethernet10 39 twentyfiveGigE1/11 11 25000 +Ethernet11 40 twentyfiveGigE1/12 12 25000 +Ethernet12 41,42,43,44 hundredGigE1/13 13 100000 +Ethernet16 45,46,47,48 hundredGigE1/14 14 100000 +Ethernet20 49,50,51,52 hundredGigE1/15 15 100000 diff --git a/osism/tasks/conductor/sonic/constants.py b/osism/tasks/conductor/sonic/constants.py index 7a0c2bbd..e8f5f00f 100644 --- a/osism/tasks/conductor/sonic/constants.py +++ b/osism/tasks/conductor/sonic/constants.py @@ -72,6 +72,12 @@ # Path to SONiC port configuration files PORT_CONFIG_PATH = "/etc/sonic/port_config" +# List of supported vendors +SUPPORTED_VENDORS = [ + "Accton", + "DellEMC", +] + # List of supported HWSKUs SUPPORTED_HWSKUS = [ "Accton-AS4625-54T", @@ -82,4 +88,5 @@ "Accton-AS7726-32X", "Accton-AS9716-32D", "Accton-AS9726-32D", + "DellEMC-S5212f-P-25G", ] diff --git a/tests/unit/tasks/conductor/sonic/test_constants.py b/tests/unit/tasks/conductor/sonic/test_constants.py index 5207d4ac..f65e8cc8 100644 --- a/tests/unit/tasks/conductor/sonic/test_constants.py +++ b/tests/unit/tasks/conductor/sonic/test_constants.py @@ -11,6 +11,7 @@ PORT_CONFIG_PATH, PORT_TYPE_TO_SPEED_MAP, SUPPORTED_HWSKUS, + SUPPORTED_VENDORS, ) # --------------------------------------------------------------------------- @@ -147,4 +148,6 @@ def test_supported_hwskus_no_duplicates(): def test_supported_hwskus_entry_invariants(hwsku): assert isinstance(hwsku, str) assert hwsku - assert hwsku.startswith("Accton-") + assert "-" in hwsku + vendor = hwsku.split("-")[0] + assert vendor in SUPPORTED_VENDORS