Closed bsmeding closed 7 months ago
Thanks for the report!
This doesn't look like with the importer itself; that's Python saying that your NetBox JSON dump isn't a valid JSON file. Can you check the file and make sure it wasn't truncated or something like that?
Yes probably you're right, the last characters are null, "tagged_vlans": []}}
so it didnt close correct ]
Is there a limit on items/devices?
File size shouldn't be a limit, but available RAM can be when running the importer. Can you try re-exporting the data from NetBox?
To get back to the title of this issue -- In order to import 2.11 changes data we had to change the exported json:
jq '[ .[] | if (.fields.postchange_data != null) then .fields.object_data = .fields.postchange_data else .fields.object_data = .fields.prechange_data end | del(.fields.prechange_data, .fields.postchange_data) ]'
This was straight forward according to the changes from netbox 2.10 to 2.11. (just put postchange_data into object_data except for cases where there is no postchange_change (e.g. deletes) where we take it from prechange_data).
But it happened that there were still fields with object_data=null which I cannot explain and just deleted with
`` jq '[ .[] | select(.fields.object_data != null)]'
Adding known NetBox changes that would need to be accommodated for full 2.11 support:
ProviderNetwork
model
SiteGroup
model
JournalEntry
model
Note
model, it should be relatively straightforward to translate one to the other.RackGroup
to Location
RackGroup
model; Nautobot Locations
are a different thing.Rack.group
to Rack.location
also needs to be accounted for.ObjectChange
model that replaced object_data
with separate prechange_data
and postchange_data
fields.
object_data_v2
field in https://github.com/nautobot/nautobot/pull/1389; some translation between the two features will be necessary.VLAN.site
foreign-key to VLAN.scope
generic-foreign-key, permitting scoping of VLANs to Regions, SiteGroups, ~RackGroups~ ("Locations") and Racks as well as Sites.
Device.location
field
Cable.mark_connected
field
Interface.parent
field
Drop in favor of NetBox 3.x
Environment
Proposed Functionality
Get support for an exported json file of Netbox 2.11.x
Use Case
Currently is is not working when setting the version to 2.10.8