Skip to content

Conversation

@mfiedorowicz
Copy link
Member

🚀 Major improvements and breaking changes:

  • Expanded support for NetBox object types: broader compatibility with additional NetBox models to enhance integration capabilities
  • OAuth2 authentication added: introduces support for OAuth2, enabling more secure and flexible authentication workflows (API key authentication deprecated)
  • Streamlined plugin setup: no longer requires manual user or token provisioning

mfiedorowicz and others added 30 commits October 14, 2024 16:55
* enable netbox_branching plugin by default in development/test docker image

* include netbox-worker

* add development setting defaults

* don't pin branching plugin
* chore: add safe redirect to login

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: gha - add missing permissions

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: gha - pin actions to commit hashes

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
* updates sdk to pick up ignored state

* handle unknown states gracefully
* chore: security improvements (#53)

* chore: add safe redirect to login

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: gha - add missing permissions

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: gha - pin actions to commit hashes

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>

* update protobufs

* update constants in tests

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
Co-authored-by: Michal Fiedorowicz <[email protected]>
Signed-off-by: Michal Fiedorowicz <[email protected]>
* chore: remove reconciler sdk

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix: docker setup with netbox 4.1.11 for netbox-branching plugin

Signed-off-by: Michal Fiedorowicz <[email protected]>

* feat: remove ingestion logs view

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: update CODEOWNERS

Signed-off-by: Michal Fiedorowicz <[email protected]>

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
* fix: retrieve object states using concrete models

Search backend/CachedValue is global and doesn't seem to be reliable with branching

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: bump netbox min version and netbox-docker

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: bump netbox min version

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix tests

Signed-off-by: Michal Fiedorowicz <[email protected]>

* use clean_fields() and tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix: add backwards compatible support for mac_address field (#62)

* fix: add backwards compatible support for mac_address field

* feat: extract and serialize site from scope

Signed-off-by: Michal Fiedorowicz <[email protected]>

* feat: apply change set - handle scope site

Signed-off-by: Michal Fiedorowicz <[email protected]>

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
Co-authored-by: Luke Tucker <[email protected]>
* fix: retrieving object states of tags

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix: skip creating objects if already exist

Signed-off-by: Michal Fiedorowicz <[email protected]>

* chore: refactor apply change set view complexity

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
* fix: scope support on apply change set (#64)

Signed-off-by: Michal Fiedorowicz <[email protected]>

* wip diff api

* set default values and missing slugs

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up setting defaults

Signed-off-by: Michal Fiedorowicz <[email protected]>

* remove unused imports

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix constructor of object type

Signed-off-by: Michal Fiedorowicz <[email protected]>

* set slugs (if not present) after resolving existing instances

Signed-off-by: Michal Fiedorowicz <[email protected]>

* emit ref_id instead of variable object_id field for new objects

* improve entity field mapping coverage

* fill in primary value mapping, use primary value for slug

* use canonical field ordering in change dicts

* first pass at certain common circular refs

* remove ref id to itself

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

* add applier

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix resolve ref before lookup, use field name directly, not field attr

* don't query with unresolved references

* fix _build_expressions_queryset

Signed-off-by: Michal Fiedorowicz <[email protected]>

* resolve lint issues

Signed-off-by: Michal Fiedorowicz <[email protected]>

* exclude fields with GenericRelation type

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix sorting dict

we may get ints strings etc

Signed-off-by: Michal Fiedorowicz <[email protected]>

* rework applier logic

Signed-off-by: Michal Fiedorowicz <[email protected]>

* applier with content type fields

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix content type related existing value

Signed-off-by: Michal Fiedorowicz <[email protected]>

* exclude foreign key fields with many to one rel

Signed-off-by: Michal Fiedorowicz <[email protected]>

* fix: support for post create updates eg (primary mac address) (#68)

* fix: support for post create updates eg (primary mac address)

* use serializers, fix relevent tests

* linting

* filter fields in the prior state

* add some basic smoke tests for diff / diff+apply

* Change set validation (#69)

* add change set validation

Signed-off-by: Michal Fiedorowicz <[email protected]>

* remove redundant serializers

Signed-off-by: Michal Fiedorowicz <[email protected]>

* remove redundant serializers tests

Signed-off-by: Michal Fiedorowicz <[email protected]>

* tidy up

Signed-off-by: Michal Fiedorowicz <[email protected]>

* adjust tests, lighter validation of refs on diff, handle generic

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
Co-authored-by: Michal Fiedorowicz <[email protected]>

* fix: expand support for cycle breaking, add additional logical matchers (#70)

* fix: fix error fingerprinting tags (#71)

* fix: all noops -> no changes, show noops as only prior state (#72)

---------

Signed-off-by: Michal Fiedorowicz <[email protected]>
Co-authored-by: Michal Fiedorowicz <[email protected]>
basic support for custom fields
special transformations to format inputs the way serializers expect
adds handling for date only fields, decimal (vs float) and integer range
* fix: special handling for ip address network defaulting

* fix: match ips ignoring mask value, use specific matchers
* fix: fix complex vm interface update case

* lint
…x Plugin

- Added DiodeOAuth2Authentication class for handling OAuth2 token validation.
- Introduced IsDiodeOAuth2Authenticated permission class to check OAuth2 authentication.
- Updated GenerateDiffView and ApplyChangeSetView to use the new authentication and permission classes.

Signed-off-by: Michal Fiedorowicz <[email protected]>
* fix: handle callable defaults, defaults with non serializable values

* fix: mark circuits.provider.accounts as circular

* fix: error deduplicating device types

* fix: report merge errors as 400 not 500

* fix: mark device oob_ip as circular

* fix: adjust fingerprint matching for complex module bay case

* fix: test virtual machine with primary_ip4 errors, logical cluster matching

* fix: harmonize ZoneInfo values

* fix: fix logical prefix in vrf lookup

* fix: handle IntegrityError nicely

* fix: support cached scope for matching

* fix: add additional logical matchers

* fix: don't alter arrays. output prior states for other ref types

* fix: add table test for create/update of various types

* fix: additional fixes from testing

* fix: reduce logging, guard expensive trace logging with flag

* fix: linting
ltucker and others added 18 commits April 23, 2025 16:59
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…output handling in workflow

Signed-off-by: Michal Fiedorowicz <[email protected]>
@github-actions
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2824 2630 93% 0% 🟢

New Files

File Coverage Status
netbox_diode_plugin/api/applier.py 92% 🟢
netbox_diode_plugin/api/authentication.py 96% 🟢
netbox_diode_plugin/api/common.py 88% 🟢
netbox_diode_plugin/api/differ.py 94% 🟢
netbox_diode_plugin/api/matcher.py 88% 🟢
netbox_diode_plugin/api/plugin_utils.py 82% 🟢
netbox_diode_plugin/api/supported_models.py 91% 🟢
netbox_diode_plugin/api/transformer.py 89% 🟢
netbox_diode_plugin/tests/test_api_diff_and_apply.py 100% 🟢
netbox_diode_plugin/tests/test_api_generate_diff.py 100% 🟢
netbox_diode_plugin/tests/test_authentication.py 99% 🟢
netbox_diode_plugin/tests/test_updates.py 93% 🟢
TOTAL 93% 🟢

Modified Files

File Coverage Status
netbox_diode_plugin/init.py 100% 🟢
netbox_diode_plugin/api/init.py 100% 🟢
netbox_diode_plugin/api/permissions.py 100% 🟢
netbox_diode_plugin/api/serializers.py 0% 🟢
netbox_diode_plugin/api/urls.py 100% 🟢
netbox_diode_plugin/api/views.py 79% 🟢
netbox_diode_plugin/forms.py 100% 🟢
netbox_diode_plugin/models.py 100% 🟢
netbox_diode_plugin/navigation.py 100% 🟢
netbox_diode_plugin/plugin_config.py 96% 🟢
netbox_diode_plugin/tests/init.py 100% 🟢
netbox_diode_plugin/tests/test_api_apply_change_set.py 99% 🟢
netbox_diode_plugin/tests/test_forms.py 100% 🟢
netbox_diode_plugin/tests/test_models.py 100% 🟢
netbox_diode_plugin/tests/test_plugin_config.py 100% 🟢
netbox_diode_plugin/tests/test_version.py 100% 🟢
netbox_diode_plugin/tests/test_views.py 100% 🟢
netbox_diode_plugin/urls.py 100% 🟢
netbox_diode_plugin/version.py 100% 🟢
netbox_diode_plugin/views.py 100% 🟢
TOTAL 94% 🟢

updated for commit: c8e6b9c by action🐍

Copy link
Contributor

@leoparente leoparente 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 merged commit a1a7f57 into release Apr 24, 2025
8 checks passed
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.

3 participants