Skip to content

Conversation

mfiedorowicz
Copy link
Member

Fixes #136


This pull request updates the Diode NetBox plugin to support newer NetBox versions and improves compatibility, dependency management, and data handling. The most important changes include updating the base NetBox version, adding a new migration for the ClientCredentials model, enhancing the data preparation logic for relation fields, and updating dependencies.

NetBox version and Docker updates:

  • Updated the base NetBox version in Dockerfile-diode-netbox-plugin and docker-compose.yaml from v4.3.3-3.3.0 to v4.4.2-3.4.1 to ensure compatibility with newer NetBox releases. [1] [2]
  • Added a new plugin version (1.4.1) to the compatibility table in README.md.

Database and model improvements:

  • Added a migration (0006_clientcredentials_alter_setting_diode_target.py) to create the ClientCredentials model (unmanaged, for permissions/saved filters) and altered the Setting.diode_target field to use a validator.
  • Introduced UnmanagedModelManager for unmanaged models like ClientCredentials, preventing accidental database queries.

Dependency updates:

  • Updated the netboxlabs-netbox-branching dependency from 0.6.0 to 0.7.1 in requirements-diode-netbox-plugin.txt.

Data handling improvements:

  • Improved _prepare_data in api/matcher.py to handle both single and multiple related object types (ForeignKey and ManyToMany fields) by converting lists of objects to content type IDs.

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
…ion for matcher

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3941 3563 90% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
netbox_diode_plugin/api/matcher.py 88% 🟢
netbox_diode_plugin/models.py 97% 🟢
TOTAL 92% 🟢

updated for commit: 6476408 by action🐍

Copy link
Contributor

@jajeffries jajeffries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mfiedorowicz mfiedorowicz changed the title fix: client credentials model fix: client credentials model and migrations Oct 15, 2025
@mfiedorowicz mfiedorowicz merged commit 97bf9ae into develop Oct 15, 2025
7 checks passed
@mfiedorowicz mfiedorowicz deleted the fix-client-credentials-model branch October 15, 2025 11:35
@mfiedorowicz mfiedorowicz mentioned this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin -> System yields error on NetBox 4.4.x + Diode 1.4.0

2 participants