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

SoT Weight

Open mattmiller87 opened this issue 2 years ago • 2 comments

Environment

  • Nautobot version: 1.4.5
  • nautobot-ssot version: 1.2.0

Proposed Functionality

Given multiple Sources of Truth, and duplicate devices, data about the device is going to be added into Nautobot. It would be helpful if there was a prioritization option on either the source or on the job run.

Use Case

As an engineer, when information about an existing device is going to be added we can determine if we should override or not. Then when records that conflict between multiple SSoT plugins, we would have the ability to select which one “wins”.

mattmiller87 avatar Nov 02 '22 16:11 mattmiller87

This is an interesting one!

chadell avatar Nov 02 '22 16:11 chadell

Just a stream of consciousness here.

  1. In other situations in which we preferred some data when required, we created a "cache model", which would allow us to sync from system 1 -> cache model 1 and system 2 to cache model2, and then a single sync job from the 2 cache models to the Nautobot model. This allows sync of system 1 at any time without having to sync system 2. The business logic was added to the diffsync plugin to accomplish.
  2. What would the weight apply to? It's not really clear to me. If system 1 & 2 have a serial number, why not just choose one of those two systems. If wanting to have some data vs no data, I think a fallback system would make sense, but not sure I understand weight. Additionally, they would have to be evaluated at the same time (hence the work around described in the previous point)
  3. Why not use flags to ignore certain attributes from a less "weighted" system and just not use them at all?
  4. The challenge with conditionally uploading the data if empty is once again that you do not have all of the other sync data at the same time.

I think my recommendations would be

  • Short term, recommend and document the cache model approach.
  • Long term to create better capabilities to run all of your sync jobs at once, so you have all of the context at once, and develop either a series of flags or weights as mentioned

itdependsnetworks avatar Jan 13 '24 21:01 itdependsnetworks