“The best thing about sources of truth is that you can have as many of them as you need/want” - said no one, ever.
For historic reasons (two teams merging) I have the need to combine two instances of NetBox in to one - this is to reduce the TCO of the two systems, to reduce the need for repeated permissions, to ensure consistency of device types and to ensure all team members know there is indeed only one source of truth. The two instances I currently look after represent many many hundreds of hours of work as we have documented devices, virtual machines, IPAM and cables between approximately 250 racks. There is complete inconsistency between the two in terms of tenants, device types, roles etc that I will need to deal with in time, but first and foremost I want to get all the objects for all the models imported. I can work on sanitising the data later and plan to do that with a combination of reports, external scripts using PyNetbox, bulk edits and sheer hard work!
I know it’s going to be hard to merge the two and I appreciate this is going to mean changes to all the object IDs - that alone is going to have a huge knock on impact to all the systems I have that feed off of my (two) sources of truth at the moment and one that I know I am going to need to deal with. Hence the desire to find the easiest way to import all the data from both in to one. The start-up scripts and initialisers supplied with the netbox-docker project seem to have the potential to be the easiest way to make this happen by re-creating new objects that fundamentally appear (to the user at least) similar to the existing ones. As far as I can see they already deal with the need to create certain objects before other objects through the use of sequential file naming to ensure, for example, devices are created before the interfaces that belong to them.
Incidentally, how much input does the NetBox core team have in to the development and support of the netbox-docker project? It seems this functionality might have been developed to facilitate unit and integration testing to guarantee a known collection of data on container start up?
My question was whether the need to create template interfaces, ports etc had been catered for or not and whether the approach would need to be similar to the creation of interfaces on live objects - i.e. it appears that had been catered for, how easy would it be to adapt that to create template interfaces instead? I’m willing and able to put some hours in to Python coding, I have little experience however with Django and the ORM, but I’m learning. So far I’ve successfully written a script to create devices and connections from an Excel spreadsheet (not CSV) so I know it should be possible.
As an aside, I guess it would be a challenge, but would suggesting a move to UUID based keys be an FR worth raising with Jeremy et al? I had an idea about how to create a UUID based on current data, but it seems Django already has a UUIDField type. I won’t pretend I know anything about how it would work in reality nor how it could be added to an existing NetBox instance - I’ll look to people cleverer than me for that!
Many thanks