Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if thanix_client and NetBox version are compatible #78

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

ByteOtter
Copy link
Member

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.
(The-Nazara-Project/Thanix@35ffbe1)

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:

  • thanix_client v1.x is used with NetBox v3.6.x
  • thanix_client v2.x is used with NetBox v4.x.x

For this

Tick the applicable box:

  • Add new feature
  • Security changes
  • Tests
  • Documentation changed

  • General Maintenance

Links

Fixes: n/A

  • DONE

Documentation

  • Code documentation present

  • DONE

Change error handling of connection probing
src/main.rs Show resolved Hide resolved
@ByteOtter ByteOtter merged commit 4219f46 into main Sep 9, 2024
4 checks passed
@ByteOtter ByteOtter deleted the version-verify branch September 9, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants