-
Notifications
You must be signed in to change notification settings - Fork 672
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
[sflow] Fix traceback seen for show sflow interface #1282
Conversation
This PR fixes this issue: |
@padmanarayana to review |
This pull request introduces 1 alert and fixes 4 when merging c6a7d87737fa43853e56f13bf9fdfd07b4ba7faf into 04dd841 - view on LGTM.com new alerts:
fixed alerts:
|
@prsunny - Test failures doesn't appear to be sFlow related. |
retest this please |
retest this please |
can you add unit test case? |
@lguohan - No problem. Will add test-case tomorrow. Moving this PR to draft for now. |
* Fix traceback seen for 'show sflow interface' command * Update unit-test cases Signed-off-by: Garrick He <garrick_he@dell.com> Signed-off-by: ghe <ghe@contoso.com> Signed-off-by: Garrick He <garrick_he@dell.com>
@prsunny @lguohan @padmanarayana - I added the required test-cases. I ran it with and without the fix to ensure this issue is covered. |
@@ -261,6 +261,35 @@ def test_config_sflow_intf_sample_rate(self): | |||
|
|||
return | |||
|
|||
def test_config_disable_all_intf(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see the test covering the app db entries or the 'show' command. ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the faulty entries into appl_db.json and the test_show_intf()
on line 55 will ensure we don't traceback due to the bad entries.
The two new test I added test_config_enable_all_intf
and test_config_disable_all_intf
merely ensures the proper configDB entries get added when the user runs those commands.
Fixed a traceback seen when show sflow interface is executed. Updated the script to follow Python3 conventions. Signed-off-by: Garrick He <garrick_he@dell.com>
Signed-off-by: Garrick He garrick_he@dell.com
- What I did
Fixed a traceback seen when
show sflow interface
is executed.- How I did it
Updated the script to follow Python3 conventions.
- How to verify it
Retested the command to ensure no traceback is seen.