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

Fix scripts so they no longer use Netbox.snmp_version #2389

Closed
hmpf opened this issue Apr 7, 2022 · 2 comments · Fixed by #2429
Closed

Fix scripts so they no longer use Netbox.snmp_version #2389

hmpf opened this issue Apr 7, 2022 · 2 comments · Fixed by #2429
Assignees
Labels
good first issue Needs no networking experience and is assumedly small

Comments

@hmpf
Copy link
Contributor

hmpf commented Apr 7, 2022

Scripts that still access Netbox.snmp_version triggers the warning

/usr/bin/navSCRIPT:73: DeprecationWarning: The Netbox.snmp_version attribute will be removed in the next feature release

This can make it difficult to eyeball what the script actually returns and needs to be updated to the new method before snmp_version disappears as an attribute.

@hmpf hmpf added the good first issue Needs no networking experience and is assumedly small label Apr 7, 2022
@hmpf hmpf changed the title Fix scripts to no longer use Netbox.snmp_version Fix scripts so they no longer use Netbox.snmp_version Apr 7, 2022
@johannaengland johannaengland self-assigned this Jun 20, 2022
@johannaengland
Copy link
Contributor

Notes from an irl discussion with @lunkwill42
This issue basically consists of three steps:

  1. Create a new public method on Netbox that returns a preferred management profile. This function basically works the same way that _get_snmp_config currently works: return the management profile with the highest snmp version which is writable or not (or both) depending on a given parameter.
  2. Create two more public methods on Netbox that call this method with the writable parameter either being True or False so to get either a read-only or a read-write management profile.
  3. All previous usage of the .snmp_version function should be changed to call one of the methods from step 2.

@lunkwill42
Copy link
Member

This issue does not cover ipdevpoll. Ipdevpoll needs its own issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Needs no networking experience and is assumedly small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants