The-Nazara-Project / Nazara

A CLI application to create and update machines and VMs in Netbox.
GNU General Public License v3.0
11 stars 2 forks source link

Check if thanix_client and NetBox version are compatible #78

Closed ByteOtter closed 1 month ago

ByteOtter commented 1 month ago

What does this PR change?

Given that we have to run thanix_client with two versions - one for NetBox v3.6.9 and one for v4.x.x we need to check, if the current version of NetBox is compatible with the used API client.

For this we have adjusted Thanix to also generate a custom build.rs for thanix_client together with a new version.rs module which contains the current version of the crate. (https://github.com/The-Nazara-Project/Thanix/commit/35ffbe1da6c187ddd891125f7e9e5325f84e40db)

The opening API request from Nazara's end is then on $URL/api/status. On this response, a simple check is run to determine, whether the VERSION constant from thanix_client and NetBox are compatible.

It is compatible, if:

For this

Tick the applicable box:

Links

Fixes: n/A

Documentation