Add the option to automatically push changes to objects when synchronizing data sources #7839

Closed
opened 2025-12-29 20:28:50 +01:00 by adam · 1 comment
Owner

Originally created by @jeremystretch on GitHub (Mar 31, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.5-beta1

Feature type

Change to existing functionality

Proposed functionality

#11558 introduced the ability to populate certain object data from remote data sources. Currently, this is a two-step process:

  1. Run a synchronization job to create/update local DataFile objects from the source.
  2. Individually sync NetBox objects to reflect the new data in those DataFiles.

This separation of tasks is intentional, and ensures a decoupling of synchronization jobs (which are expected to be automated) from effecting a change to production data. However, there may be cases where it's desirable to effect changes immediately upon synchronization with the remote source.

This FR proposes the addition of an auto_sync boolean field to the SyncedDataMixin class. Any object with auto_sync set to true shall have its sync_data() method called automatically upon its associated DataFile being updated.

Use case

This provides an alternative direct coupling approach to employing synchronized object data, while preserving the existing loose coupling as the default option.

Database changes

No response

External dependencies

No response

Originally created by @jeremystretch on GitHub (Mar 31, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.5-beta1 ### Feature type Change to existing functionality ### Proposed functionality #11558 introduced the ability to populate certain object data from remote data sources. Currently, this is a two-step process: 1. Run a synchronization job to create/update local DataFile objects from the source. 2. Individually sync NetBox objects to reflect the new data in those DataFiles. This separation of tasks is intentional, and ensures a decoupling of synchronization jobs (which are expected to be automated) from effecting a change to production data. However, there may be cases where it's desirable to effect changes immediately upon synchronization with the remote source. This FR proposes the addition of an `auto_sync` boolean field to the `SyncedDataMixin` class. Any object with `auto_sync` set to true shall have its `sync_data()` method called automatically upon its associated DataFile being updated. ### Use case This provides an alternative direct coupling approach to employing synchronized object data, while preserving the existing loose coupling as the default option. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: featurebeta labels 2025-12-29 20:28:50 +01:00
adam closed this issue 2025-12-29 20:28:51 +01:00
Author
Owner

@arjenvri commented on GitHub (Apr 6, 2023):

This is a great feature! Would this also allow for existing object data update and removal possibly based on the remote data source data?

@arjenvri commented on GitHub (Apr 6, 2023): This is a great feature! Would this also allow for existing object data update and removal possibly based on the remote data source data?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7839