nautobot-app-ssot
nautobot-app-ssot copied to clipboard
Enable/Disable models to be imported
Proposed Functionality
Add an option to disable/enable import of models of a plugin.
Use Case
Sometimes, even though an SSoT plugin have mapping implemented for dozens of models, the specific use-case only requires a few of them, so it would make sense to offer an easy way to enable/disable them.
In case some of these models had some dependencies, for instance a Site model requires the Region model we could show the dependency issue and help the user to select the models that make sense.
Just to be clear about your thoughts on this, are you expecting the filtering to be done prior to the adapters being loaded or after the diff is done and before CRUD ops are executed?
this issue is for "before" loading. The issue #37 would be for the second
Thanks for the clarification. Just wanted to make sure we were on the same page. I think to do this we would most likely need to get a list of the objects in the DataTarget and present them to the user in the Job form. We'd also need to update the top_level lists to narrow down to what is selected I think or somehow else alter what is worked on. Would definitely need some mechanism to catch dependencies like you mentioned.
We have had a spike in users of nautobot-plugin-ssot-ipfabric that are asking for this feature as well.
@alhogan Could you by chance provide examples of the specific subsets they're wanting to import/exclude?
I believe users are just a little weary of syncing everything at once so they would like the option to sync each model individually. The IP Fabric SSOT plugin only syncs the following models at the moment:
- Sites
- Devices
- Interfaces
- IP Addresses
- VLANs
I think ideally, most people want the ability to sync objects that only belong to a specific site as well.
@glennmatthews , as the SSoT plugins grow in coverage, this is more and more needed. For instance, following the ipfabric example, if the user is only interested on Sites and Devices to build the inventory in Nautobot, and the rest of the data (interface and ipam) is not relevant, why import it? (with the penalty on performance and usability) SSoT should allow a way to influence on what information is loaded (without breaking any enforcement from diffsync, such as not importing Devices but importing Interfaces). I think that something like the mappings.yaml but via configuration settings, that is taken into account in the load method could be an interesting idea to explore.