-
Notifications
You must be signed in to change notification settings - Fork 47
Use SNMPv3 contexts for collecting logical BRIDGE-MIB instances (primarily Cisco) #3668
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
base: master
Are you sure you want to change the base?
Conversation
e870583 to
0feea79
Compare
Henceforth, a logical MIB instance identifier may also include an optional SNMPv3 context name, and an optional context engine ID, if such things were discovered. Since a community value makes no sense for SNMPv3 communication, the community field should also be optional.
Some code still expected a BRIDGE-MIB instance descriptor to be a two-tuple value, but should really produce LogicalMibInstance named tuples.
We need to fetch context name and context engine ID values from logical MIB instances to know how to configure our SNMPv3 requests to fetch these logical instances.
In order to support SNMPv3 contexts, this adds `context_name` and `context_engine_id` as optional attributes on SNMPParameters objects, and ensures the correct Net-SNMP command line arguments are generated for them.
Making alternate agent proxy instances need to consider which SNMP version is represented, as changing the community makes no sense on SNMPv3 sessions, while changing context name (and optionally adding a context engine id) does. It's also easier and more portable to manipulate parameters selectively by modifying the `snmp_parameters` of the existing session: That way, all other parameters of the session are carried through to the alternate agent proxies.
Only care about debug logging that we got results from alternate agent proxies, as timeouts would be silently ignored.
0feea79 to
6c555bb
Compare
|
Test results 14 files 14 suites 13m 17s ⏱️ For more details on these failures, see this check. Results for commit 6c555bb. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3668 +/- ##
==========================================
- Coverage 62.94% 62.73% -0.22%
==========================================
Files 611 612 +1
Lines 45145 45172 +27
Branches 43 43
==========================================
- Hits 28417 28339 -78
- Misses 16718 16823 +105
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Scope and purpose
Fixes #2811. Dependent on #3664.
This is still a work in progress, since I'm not yet able to confirm this functionality with real devices due to potential SNMPv3 authorization issues with test equipment.
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.
<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.