nautobot-app-ssot icon indicating copy to clipboard operation
nautobot-app-ssot copied to clipboard

Enable/Disable models to be imported

Open chadell opened this issue 3 years ago • 7 comments
trafficstars

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.

chadell avatar Mar 28 '22 05:03 chadell

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?

jdrew82 avatar Jul 29 '22 13:07 jdrew82

this issue is for "before" loading. The issue #37 would be for the second

chadell avatar Jul 29 '22 14:07 chadell

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.

jdrew82 avatar Jul 29 '22 14:07 jdrew82

We have had a spike in users of nautobot-plugin-ssot-ipfabric that are asking for this feature as well.

alhogan avatar Oct 05 '22 15:10 alhogan

@alhogan Could you by chance provide examples of the specific subsets they're wanting to import/exclude?

glennmatthews avatar Oct 05 '22 15:10 glennmatthews

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.

alhogan avatar Oct 05 '22 18:10 alhogan

@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.

chadell avatar Feb 28 '23 11:02 chadell