netbox-sync
netbox-sync copied to clipboard
Allow to avoid overriding the Devices Site with the default site (vCenter: <vcenter-name>)
I have some Hosts in the vCenter for which the site can't be inferred from the name, and therefore are set to the default site (vCenter: <vcenter-name>
) by the sync.
I then manually put the Devices in the right Site and Rack. But then on the next run of the sync script, those Devices generates errors because the sync tries to override the Site to the default.
Example of error:
2024-08-10 02:20:02,151 - ERROR: NetBox returned: PATCH /api/dcim/devices/4707/ Bad Request
2024-08-10 02:20:02,151 - ERROR: NetBox returned body: {'rack': ['Rack XYZ does not belong to site vCenter: <vcenter-name>.']}
Is there a way to bypass the override of the Site when the device already has a Site in NetBox that is not the default one?