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

Remove remaining uses of Netbox.snmp_version #2522

Closed
Tracked by #1177
johannaengland opened this issue Nov 30, 2022 · 0 comments · Fixed by #2743
Closed
Tracked by #1177

Remove remaining uses of Netbox.snmp_version #2522

johannaengland opened this issue Nov 30, 2022 · 0 comments · Fixed by #2743

Comments

@johannaengland
Copy link
Contributor

johannaengland commented Nov 30, 2022

Now that #2389 is closed the deprecated Netbox.snmp_version is still used in ipdevpoll. This should also be replaced using Netbox.get_preferred_management_profile.

lunkwill42 added a commit to lunkwill42/nav that referenced this issue Nov 15, 2023
Netbox shadow objects used to use the pseudo attributes `read_only` and
`snmp_version` to store the SNMP v1/v2c read-only community and SNMP
version.  On the Netbox Django model, these are computed properties,
based on the Netbox' preferred SNMP management profile, and have been
deprecated for a while.

Since ipdevpoll now needs to access more complicated SNMP management
configuration for a Netbox, this changes the Netbox shadow model to
store an SNMPParameters object directly, which will be populated from
the Netbox' preferred SNMP profile.

Usages of the removed attributes have been updated.  Usages mostly
concern themselves with verifying that a device actually has an SNMP
profile at all.

However, the ipdevpoll dataloader used the value of the pseudo
attributes to detect whether a Netbox' management credentials had
changed and needed to be reloaded from the database, and this patch does
not fully replace that.

This more or less fixes Uninett#2522
lunkwill42 added a commit to lunkwill42/nav that referenced this issue Nov 17, 2023
Netbox shadow objects used to use the pseudo attributes `read_only` and
`snmp_version` to store the SNMP v1/v2c read-only community and SNMP
version.  On the Netbox Django model, these are computed properties,
based on the Netbox' preferred SNMP management profile, and have been
deprecated for a while.

Since ipdevpoll now needs to access more complicated SNMP management
configuration for a Netbox, this changes the Netbox shadow model to
store an SNMPParameters object directly, which will be populated from
the Netbox' preferred SNMP profile.

Usages of the removed attributes have been updated.  Usages mostly
concern themselves with verifying that a device actually has an SNMP
profile at all.

However, the ipdevpoll dataloader used the value of the pseudo
attributes to detect whether a Netbox' management credentials had
changed and needed to be reloaded from the database, and this patch does
not fully replace that.

This more or less fixes Uninett#2522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant