Skip to content

Commit 0de5e83

Browse files
committed
[gcu]: Add marvell-teralynx platform to gcu field validator
Enable BUFFER_PROFILE replace operation on dynamic_th field and PFC_WD field operations on marvell-teralynx platform starting 20241100 Sonic version Signed-off-by: Ravi Minnikanti <[email protected]>
1 parent 5db13c2 commit 0de5e83

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

generic_config_updater/field_operation_validators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def get_asic_name():
2929

3030
if asic_type == 'cisco-8000':
3131
asic = "cisco-8000"
32+
if asic_type == 'marvell-teralynx':
33+
asic = "marvell-teralynx"
3234
elif asic_type == 'mellanox' or asic_type == 'vs' or asic_type == 'broadcom':
3335
proc = subprocess.Popen(GET_HWSKU_CMD, shell=True, universal_newlines=True, stdout=subprocess.PIPE)
3436
output, err = proc.communicate()

generic_config_updater/gcu_field_operation_validators.conf.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"td4": "20241100",
7070
"q2c+": "20241100",
7171
"j2c+": "20220500",
72-
"cisco-8000": "20201200"
72+
"cisco-8000": "20201200",
73+
"marvell-teralynx": "20241100"
7374
}
7475
}
7576
}
@@ -133,7 +134,8 @@
133134
"td4": "20241100",
134135
"q2c+": "20241100",
135136
"j2c+": "20220500",
136-
"cisco-8000": "20201200"
137+
"cisco-8000": "20201200",
138+
"marvell-teralynx": "20241100"
137139
}
138140
},
139141
"PG headroom modification": {

tests/generic_config_updater/field_operation_validator_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,3 +497,9 @@ def test_get_asic_cisco(self, mock_popen, mock_get_sonic_version_info):
497497
mock_get_sonic_version_info.return_value = {'asic_type': 'cisco-8000'}
498498
for scope in ["localhost", "asic0"]:
499499
self.assertEqual(fov.get_asic_name(), "cisco-8000")
500+
501+
@patch('sonic_py_common.device_info.get_sonic_version_info')
502+
def test_get_asic_marvell_teralynx(self, mock_get_sonic_version_info):
503+
mock_get_sonic_version_info.return_value = {'asic_type': 'marvell-teralynx'}
504+
for scope in ["localhost", "asic0"]:
505+
self.assertEqual(fov.get_asic_name(), "marvell-teralynx")

0 commit comments

Comments
 (0)