diff --git a/tests/common/snappi_tests/common_helpers.py b/tests/common/snappi_tests/common_helpers.py index 68ce47f8367..35155095035 100644 --- a/tests/common/snappi_tests/common_helpers.py +++ b/tests/common/snappi_tests/common_helpers.py @@ -472,20 +472,20 @@ def config_wred(host_ans, kmin, kmax, pmax, profile=None, asic_value=None): color = 'green' - # Broadcom ASIC only supports RED. - if asic_type == 'broadcom': + # Broadcom DNX ASIC only supports RED. + if "platform_asic" in host_ans.facts and host_ans.facts["platform_asic"] == "broadcom-dnx": color = 'red' - kmax_arg = '-{}max' % color[0] - kmin_arg = '-{}min' % color[0] + kmax_arg = '-{}max'.format(color[0]) + kmin_arg = '-{}min'.format(color[0]) for p in profiles: """ This is not the profile to configure """ if profile is not None and profile != p: continue - kmin_old = int(profiles[p]['{}_min_threshold' % color]) - kmax_old = int(profiles[p]['{}_max_threshold' % color]) + kmin_old = int(profiles[p]['{}_min_threshold'.format(color)]) + kmax_old = int(profiles[p]['{}_max_threshold'.format(color)]) if kmin_old > kmax_old: return False