vcenter-netbox-sync
vcenter-netbox-sync copied to clipboard
Add Support for NetBox API version 2.9
This adds support for NetBox 2.9 API changes. It is not backwards compatible with older NetBox API Versions.
Also adds some minor code improvements.
Refs: #129
Thank you. For me it's work. Netbox (v2.9.4).
Great.
I just started a complete reimplementation of this whole project.
Hope to finish it next week.
Would also need some testers 😀
Also using it here, thank you. Sign me up to test your future improvements 🤘
We are using it and have a non production environment where I would be more then happy yo help test the reimplementation
Thanks for the update I haven't noticed any problems so far. Also looking forward to any news on the reimplementation.
I'm also using it here, thank you Ricardo!
Sign me up for testing too
Thanks! This almost works for us. There seems to be an issue where it the check for the the type of vCenter platform exists or not. When the initial check for it occurs Netbox responds that it does not exist. However, when vcenter-netbox-sync attempts to create the platform, Netbox now responds that it does exist.
This ultimately prevents the vCenter appliance from being created.
2020-10-29 20:36:13,997 [DEBUG] Sending GET to 'https://netbox.redacted.com/api/dcim/platforms/?name=Linux 4.4.221-3.ph1 VMware Photon 1.0 Photon VMware Photon 1.0 ' with data 'None'. 2020-10-29 20:36:14,042 [DEBUG] Received HTTP Status 200. 2020-10-29 20:36:14,043 [DEBUG] NetBox GET request OK; returned 200 status. 2020-10-29 20:36:14,043 [INFO] Netbox platforms 'Linux 4.4.221-3.ph1 VMware Photon 1.0 Photon VMware Photon 1.0 ' object not found. Requesting creation. 2020-10-29 20:36:14,044 [DEBUG] Sending POST to 'https://netbox.redacted.com/api/dcim/platforms/' with data '{'name': 'Linux 4.4.221-3.ph1 VMware Photon 1.0 Photon VMware Photon 1.0 ', 'slug': 'linux-4-4-221-3-ph1-vmware-photon-1-0-photon-vmware-photon-1-0-'}'. 2020-10-29 20:36:14,061 [DEBUG] Received HTTP Status 400. 2020-10-29 20:36:14,061 [WARNING] NetBox failed to create platforms object. A duplicate record may exist or the data sent is not acceptable. 2020-10-29 20:36:14,062 [DEBUG] NetBox 400 status reason: {"name":["platform with this name already exists."],"slug":["platform with this slug already exists."]} 2020-10-29 20:36:14,062 [DEBUG] Unaccepted request data: {'name': 'Linux 4.4.221-3.ph1 VMware Photon 1.0 Photon VMware Photon 1.0 ', 'slug': #'linux-4-4-221-3-ph1-vmware-photon-1-0-photon-vmware-photon-1-0-'}
It seems the platform name has a white space at the end. And NetBox probably strips the white space and finds a platform with exactly that name and refuses the recreation of the same name.
The mentioned rewrite is coming along well and I hope to have a basic fully functionality version by the end of next week.
@josephcouture I had the same problem, see https://github.com/synackray/vcenter-netbox-sync/pull/127
I went down a rabbit hole and finally can see the light at the end of the tunnel again. This took way longer then expected (as usual).
Here you go: https://github.com/bb-Ricardo/netbox-sync
please test as much as you can: Debug logs are very welcome.