Closed ByteOtter closed 8 months ago
@SchoolGuy I think I have fixed our problem for now regarding the search key problem. If you remember, we had the problem that we did not know which key to search the current machine for in the list of machines registered. For now, by default, we always search for serial numbers. However, I am aware that, especially for weird prototypes and stuff this might not work out. So Nazara's behaviour will enforce that you give your machines unique names and pass the name to Nazara. If we have a name, we use that a primary search parameter.
Yes this moves the problem to the user but otherwise this is a problem without a solution as UUIDs and not by default part of a device and also very unreliable.
Also, if the user decides to hand over names we can assume that they are aware of their use case.
@ByteOtter I think for this PR this is a more than suitable strategy. Once we have established that it works we can in the future improve it if needed. Please continue in the direction that you are currently working to. It looks very good!
@SchoolGuy as you correctly stated today, this PR is getting kind of long. I fell now that I have reached a good point where I can merge this under the title "Implement machine get request and search". The open TODOs in this PR will be converted to issues. To this end, the next commit will contain a bunch of cleanups. Afterwards, if the CI is green, I will go ahead with a merge.
What does this PR change?
This PR will adjust Nazara's usage based on the new workflow we agreed upon.
Given that Thanix now takes care of our API client implementation we might need to change the following:
reqwest::Client
instance when probing. We should use the one provided bythanix_client
Stage 1 Goals:
Stage 2 Goals:
Tick the applicable box:
[x] Add new feature
[ ] Security changes
[ ] Tests
[x] Documentation changed
[ ] General Maintenance
Links
Fixes: #54, #61
Tracks: #60
Documentation
Documentation provided by Docstrings. Changed accordingly
[x] DONE