-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add SNMPv3 support to Portadmin #2731
Add SNMPv3 support to Portadmin #2731
Conversation
ae8f547
to
349caaa
Compare
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.
If you're removing the use of Snmp, the import at the beginning should also be removed. Otherwise all looks good
Netbox.get_preferred_snmp_manage_profile() should be trusted to return a proper SNMP profile. I see no reason to guard against faulty return values like this.
Lets the utility function set up the SNMP session for SNMPHandler based management handlers in PortAdmin.
The profile fixture returned a mocked management profile object that was incomplete. The new SNMP setup routines inspect the profile configuration more closely, and would fail. There is no need to use a Mock to mock a profile, just create an instance with an actual configuration dict, but just don't save it anywhere.
eef0401
to
9ca27c5
Compare
Changes to Portadmin and its tests were recently merged to master, and my latest changes were in conflict with these. Had to force-push an updated version to make things mergeable. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2731 +/- ##
==========================================
- Coverage 55.46% 55.46% -0.01%
==========================================
Files 567 567
Lines 41175 41172 -3
==========================================
- Hits 22838 22836 -2
+ Misses 18337 18336 -1 ☔ View full report in Codecov by Sentry. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Good point. Even though they are marked as unused by my IDE, we don't have linter rules that will trigger this (SonarCloud apparently doesn't, and our pylint setup is defunct). Pushed an extra commit for this cleanup. |
Tested successfully against our lab switches.
Closes #2712