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] IPv6 Route withdraw is giving exception #571

Open
selldinesh opened this issue Jul 31, 2024 · 0 comments
Open

[Snappi] IPv6 Route withdraw is giving exception #571

selldinesh opened this issue Jul 31, 2024 · 0 comments
Assignees

Comments

@selldinesh
Copy link

selldinesh commented Jul 31, 2024

Version information
snappi 0.9.1
snappi-convergence 0.4.1
snappi-ixnetwork 0.9.1

Describe the bug
Using snappi_convergence while trying to do route withdraw for v4 and v6 routes, i was getting the below exception
`
18:47:52 bgp_performance_pr.get_route_install_tim L0447 INFO | Withdraw All Routes before starting traffic
18:48:09 snappi_api.info L1132 INFO | Setting route state 0.000s
18:48:09 init.pytest_runtest_call L0040 ERROR | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/snappi_ixnetwork/snappi_convergence_api.py", line 133, in set_state
event_names = self._api.ngpf.set_route_state(route)
File "/usr/local/lib/python3.8/dist-packages/snappi_ixnetwork/device/ngpf.py", line 280, in set_route_state
ixn_obj_idx_list[route_info].extend(list(range(
KeyError: <snappi_ixnetwork.objectdb.IxNetInfo object at 0x7fd36d5c0190>

During handling of the above exception, another exception occurred:

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/AzDevOps/sonic-mgmt/tests/snappi_tests/multidut/bgp/test_bgp_performance_route_install_multiple_sessions.py", line 81, in test_bgp_route_install
run_bgp_route_install_test(api=cvg_api,
File "/var/AzDevOps/sonic-mgmt/tests/snappi_tests/multidut/bgp/files/bgp_performance_pr.py", line 55, in run_bgp_route_install_test
get_route_install_time(api,
File "/var/AzDevOps/sonic-mgmt/tests/snappi_tests/multidut/bgp/files/bgp_performance_pr.py", line 449, in get_route_install_time
cs = api.convergence_state()
File "/usr/local/lib/python3.8/dist-packages/snappi_ixnetwork/snappi_convergence_api.py", line 143, in set_state
raise SnappiIxnException(err)
snappi_ixnetwork.exceptions.SnappiIxnException: <exception str() failed>

FAILED [100%]
--------------------------------------------------------------------------- live log teardown ----------------------------------------------------------------------------
`

To Reproduce

    route_names = ['IPv6_Routes_0', 'IPv6_Routes_1']
    cs = api.convergence_state()
    cs.route.names = route_names
    cs.route.state = cs.route.WITHDRAW
    api.set_state(cs)

Expected behavior
It should withdraw both v4 and v6 routes

Additional context
for v4 routes i don't see any issue,

    route_names = ['IPv4_Routes_0', 'IPv4_Routes_1']
    cs = api.convergence_state()
    cs.route.names = route_names
    cs.route.state = cs.route.WITHDRAW
    api.set_state(cs)

this code works fine

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

No branches or pull requests

2 participants