Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2/snappi: Use natsort instead of sort for sorting the asic list in disable_pfcwd and enable_pfcwd functions. #16176

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/common/snappi_tests/qos_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
import time
import json
from natsort import natsorted
from tests.common.snappi_tests.common_helpers import \
stop_pfcwd, disable_packet_aging, enable_packet_aging
from tests.common.utilities import get_running_config
Expand Down Expand Up @@ -125,7 +126,7 @@ def get_pfcwd_config(duthost):
all_configs = []
output = duthost.shell("ip netns | awk '{print $1}'")['stdout']
all_asic_list = output.split("\n")
all_asic_list.sort()
all_asic_list = natsorted(all_asic_list)
all_asic_list.insert(0, None)
for space in all_asic_list:
config = get_running_config(duthost, space)
Expand All @@ -145,7 +146,7 @@ def reapply_pfcwd(duthost, pfcwd_config):
elif type(pfcwd_config) is list:
output = duthost.shell("ip netns | awk '{print $1}'")['stdout']
all_asic_list = output.split("\n")
all_asic_list.sort()
all_asic_list = natsorted(all_asic_list)
all_asic_list.insert(0, None)

all_files = []
Expand Down
Loading