vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
750 stars 261 forks source link

Compatibility with Netbox 4.x #7645

Open olivierlambert opened 2 months ago

olivierlambert commented 2 months ago

Our current Netbox sync plugin breaks on Netbox 4.x due to Netbox API changes.

Request origin: our own infrastructure and also internal Ticket#7724802

rafvandevreugde commented 2 months ago

Same issue here

Rafael-Schippers commented 1 month ago

Any idea on when this issue might get fixed? We rely on this feature quite a lot here.

olivierlambert commented 1 month ago

Hi!

I strongly suggest to open a support ticket related to your support subscription to get this prioritized :+1:

CMcNichol-GBSTP commented 1 month ago

Hi @olivierlambert, @pdonias,

I have tested this in a dev environment and have been able to get this plugin working with Netbox v4.0.3. Having not done a lot of work with JS, it would probably need to be checked by yourselves first. I also added a check so the plugin would still work with version less than v4, unsure if you're actively working on/fixed this internally or if you want me to create a merge request for this?

Edit: PR created for this - #7733

Thanks Chris

olivierlambert commented 1 month ago

:tada:

rvreugde commented 1 month ago

Great, thanks for the update! How can I update these changes for the NetBox pluging in my XOA installation?

olivierlambert commented 1 month ago

Hi,

You have to wait for our next release (if it's not pushed in a patch release) at the end of the month, on the latest channel.

If you are using XO from the sources, just pull and rebuild.

rvreugde commented 1 month ago

Today I received version 5.95.1, but the NetBox plugin was not updated... image Can I force the update, or do I have to wait?

olivierlambert commented 1 month ago

Yes, as I said, it will be fixed at the next release (5.96) at the end of the month. This was just a patch release today, not a monthly release.

rvreugde commented 1 month ago

OK, thanks!

rvreugde commented 2 weeks ago

Updated to xoa version 5.96 en Netbox plugin version 1.5.0. Plugin test is OK, but actual sync fails.

The error:

    "message": "400 Bad Request",
    "name": "Error",
    "stack": "Error: 400 Bad Request\n    at Object.assertSuccess (/usr/local/lib/node_modules/xo-server/node_modules/http-request-plus/index.js:162:19)\n    at httpRequestPlus (/usr/local/lib/node_modules/xo-server/node_modules/http-request-plus/index.js:217:22)\n    at httpRequest (/usr/local/lib/node_modules/xo-server-netbox/src/index.js:152:26)\n    at Netbox.#request (/usr/local/lib/node_modules/xo-server-netbox/src/index.js:181:30)\n    at Netbox.#synchronize (/usr/local/lib/node_modules/xo-server-netbox/src/index.js:656:21)\n    at Task.runInside (/usr/local/lib/node_modules/xo-server/node_modules/@vates/task/index.js:169:22)\n    at Task.run (/usr/local/lib/node_modules/xo-server/node_modules/@vates/task/index.js:153:20)\n    at Api.#callApiMethod (file:///usr/local/lib/node_modules/xo-server/src/xo-mixins/api.mjs:384:20)"
olivierlambert commented 2 weeks ago

@pdonias will take a look on Monday

ChrisMcNichol commented 1 week ago

@pdonias - Looks like your merge didn't get implemented properly for this.

Although in my tests, mine first failed on the test functionality hence finding your merge not correctly implemented / overwritten. After fixing the issue with the test button for me, it synced with no issues. XOA Version: 5.96.0 Netbox Plugin Version: 1.5.0 Netbox Version: 4.0.6

Thanks Chris

olivierlambert commented 1 week ago

@pdonias on my side it works with our own production

ChrisMcNichol commented 1 week ago

@olivierlambert @pdonias That's strange, I had to edit the index.js file to get it to work for the custom field function whilst testing to get it to succeed

pdonias commented 1 week ago

@rvreugde Could you show the full error log? There should be a netboxError field in the log.

@ChrisMcNichol I'm not sure I understand what you mean. What did you have to edit? Did you get an error?

ChrisMcNichol commented 1 week ago

@pdonias Ignore me, I had a mistake in my dev lab. Mine all works.