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

[Snappi][Bug]: indexError in snappi_tests/pfcwd/test_pfcwd_actions.py #16731

Open
sdszhang opened this issue Jan 30, 2025 · 4 comments
Open

[Snappi][Bug]: indexError in snappi_tests/pfcwd/test_pfcwd_actions.py #16731

sdszhang opened this issue Jan 30, 2025 · 4 comments

Comments

@sdszhang
Copy link
Contributor

Issue Description

IndexError when running snappi_tests/pfcwd/test_pfcwd_actions.py::test_pfcwd_drop_90_10 test cases.

Results you see

snappi_tests/pfcwd/test_pfcwd_actions.py::test_pfcwd_drop_90_10[multidut_port_info0-port_map1] 
-------------------------------- live log call ---------------------------------
00:34:39 connection._warn                         L0246 WARNING| Verification of certificates is disabled
00:34:39 connection._warn                         L0246 WARNING| Unable to connect to http://10.206.144.17:443.
00:48:08 __init__.pytest_runtest_call             L0040 ERROR  | Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 1788, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/local/lib/python3.8/dist-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.8/dist-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/var/src/xxxx_669de75fbbfea63e8b73b319/tests/snappi_tests/pfcwd/test_pfcwd_actions.py", line 160, in test_pfcwd_drop_90_10
    run_pfc_test(api=snappi_api,
  File "/var/src/xxxx_669de75fbbfea63e8b73b319/tests/snappi_tests/pfcwd/files/pfcwd_actions_helper.py", line 288, in run_pfc_test
    run_traffic_and_collect_stats(rx_duthost=ingress_duthost,
  File "/var/src/xxxx_669de75fbbfea63e8b73b319/tests/common/snappi_tests/traffic_generation.py", line 1031, in run_traffic_and_collect_stats
    f_stats = update_dict(m, f_stats, tgen_curr_stats(traf_metrics, flow_metrics, data_flow_names))
  File "/var/src/xxxx_669de75fbbfea63e8b73b319/tests/common/snappi_tests/traffic_generation.py", line 904, in tgen_curr_stats
    stats[metric_name+'_LI_rxrate_Gbps'] = float(metric['Rx L1 Rate (Gbps)'])
  File "/usr/local/lib/python3.8/dist-packages/ixnetwork_restpy/assistants/statistics/row.py", line 60, in __getitem__
    raise IndexError
IndexError

Results you expected to see

pass

Is it platform specific

generic

Relevant log output

Output of show version

Attach files (if any)

No response

@sdszhang
Copy link
Contributor Author

@amitpawar12 can you look into this issue?

@amitpawar12
Copy link
Contributor

@sdszhang - I am in discussion with IXIA team for this. This parameter was supported in 10.20 IxNetwork version but I see that it is not part of 10.80. I spoke to @kamalsahu0001 for this and he is going to check and let me know.

As a workaround, please replace line with the following in tests/common/snappi_tests/traffic_generation.py (function tgen_curr_stats)

stats[metric_name+'_LI_rxrate_Gbps'] = float(metric['Rx L1 Rate (Gbps)'])

stats[metric_name+'_Rx_L1_Rate_bps'] = float(metric['Rx L1 Rate (bps)'])

Can you please let me know the IxNetwork version that you are using?

Thanks,
-A

@sdszhang
Copy link
Contributor Author

@amitpawar12 my ixia version is: 9.30

@amitpawar12
Copy link
Contributor

Pull-request:
#16749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants