driver/power/gude: Make gude.py generic for all Gude PDUs #1746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.py
andgude8316.py
do not work for named ports, they depend on "Power Port " in the HTML content, but that can be renamed in the Web UI:gude8316.py
would 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.py
uses diffent APIs forpower_set
andpower_get
, which is a bit weird but works.gude8031.py
seems 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.json
approach 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