inetrg / inet-nm

INET Node Manager
MIT License
1 stars 1 forks source link

Some fixes for location and add location cache #12

Closed MrKevinWeiss closed 7 months ago

MrKevinWeiss commented 7 months ago

In preparation for the power control (not a simple thing with the current structure), I am adding some location caching that allows the current locations to be saved.

It is just a mapping from id, location state, and usb id_path. With this info it should not be hard to find out node info or location info stored in the config files.

Since powering on devices takes a while ~10 seconds to fully enumerate, we will need this in order to do quick checks or inventory polls. The only issue would be removing or adding a board should be followed with an update. The boards that are used would be powered anyways and can be determined by the lockfiles.

MrKevinWeiss commented 7 months ago

I had to run the CI manually due to inactivity but it passed... I can probably simplify the fake board output even more since we don't ever search for basic usb subtypes anymore but for now it is fine. Likely many changes will be coming up.