driver/power/gude: Make gude.py generic for all Gude PDUs#1746
driver/power/gude: Make gude.py generic for all Gude PDUs#1746BenM-github wants to merge 1 commit intolabgrid-project:masterfrom
Conversation
I've just tested the 8012 and 8080 variants and these unfortunately do not support the json API.
We won't deprecate any power backends soon, but I'd like to refrain from merging new drivers that are already supported by pdudaemon. |
- changed the assert upper limit to a dynamic value. - changed api endpoint to status.json, as it should be supported for all Gude PDUs Co-authored-by: Moritz Marquardt <moritz.marquardt@zeiss.com>
|
Thank you for your feedback and for testing the compatibility of the JSON API with the 8012 and 8080 variants. |
Description
We had a couple of issues with the current driver situation for Gude PDUs, so this is a suggestion of a single driver that might just work with all of them:
gude.py,gude24.pyandgude8316.pydo not work for named ports, they depend on "Power Port " in the HTML content, but that can be renamed in the Web UI:gude8316.pywould return the wrong port with our Gude 8316-1, as there are two lines before the<meta>section and it relies on the line number. That might have been the firmware difference that's referred to in the driver?gude8225.pyuses diffent APIs forpower_setandpower_get, which is a bit weird but works.gude8031.pyseems to be the most consistent one and works well for us, so that's what we went for as a basis, but it just checks against a constant port limit of 20 (so it breaks with 24-port PDUs) and suggests only being compatible with certain models whilst it is the most generic one.According to the manuals, the
status.jsonapproach should work with almost all of the PDUs listed as supported in the drivers, just with the 8225 and 8080 we couldn't find any reference to status.json, so it would be nice to test this out with the other PDUs and possibly just replace all of the drivers with a single one if it also works with those two.What would you suggest there, is that approach feasible or are there more specific behaviour differences that we are missing here? Wizkd
In general, are the power drivers for PDUs still supported or is pdudaemon now officially the replacement as mentioned in #1263 and #1031?
Checklist
Fixes #1263