Conversation
Recent update in 'show' library made 'show ip route sum' not availabe on lattest image. This commit replaces 'show ip route sum' with vtysh command. Signed-off-by: bingwang <[email protected]>
| """ | ||
| if ipv4: | ||
| end_time_ip_route_counts = dut.shell("show ip route summary | grep Total | awk '{print $2}'")["stdout"] | ||
| end_time_ip_route_counts = dut.shell("vtysh -c 'show ip route summary' | grep Total | awk '{print $2}'")["stdout"] |
There was a problem hiding this comment.
can you wrap this in a help function to call "show ip route summary" first, if not successful, call the vtysh command to return the result?
There was a problem hiding this comment.
Why do we need that? The show ip route is actually calling vtysh -c inside.
There was a problem hiding this comment.
We should use cli command whenever possible. not having the command is an image issue and it will be addressed.
There was a problem hiding this comment.
Agree. So I think we should drop this PR and let the issue to surface out since they have confirmed that this is an image issue. What do you think?
There was a problem hiding this comment.
We can keep this PR. But put the work-around at a helper function that can be updated in the future would help.
There was a problem hiding this comment.
If the workaround is added, how could we find such issue?
|
Closed. PR sonic-net/sonic-utilities#1302 addressed it. |
Signed-off-by: bingwang [email protected]
Description of PR
Summary:
Fixes # (issue)
Test case
test_cont_link_flapconsistently failed on master image. It was because recent update inshowlibrary madeshow ip route sumnot availabe on lattest image. As a result, the commandshow ip route sumwill not be able to retrieve routes count and an exception was thrown.This commit replaces 'show ip route sum' with vtysh command to fix the issue.
Type of change
Approach
What is the motivation for this PR?
This PR is to fix
test_cont_link_flapon master image.How did you do it?
This commit replaces
show ip route sumwith vtysh command to fix the issue.How did you verify/test it?
Verified on DX010-4, running lattest image.
Any platform specific information?
No.
Supported testbed topology if it's a new test case?
No.
Documentation