Repository navigation
resource/power: allow named PDUDaemon ports - #1979
Merged
Merged
Conversation
PDUDaemon supports non-numeric port identifiers since Release v1.1.1. Normalize all port identifiers to strings to preserve compatibility with numeric configurations. Fixes: labgrid-project#1778 Link: pdudaemon/pdudaemon@b30c332 Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Add test for numeric and non-numeric port index normalization. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1979 +/- ##
========================================
+ Coverage 62.1% 63.9% +1.8%
========================================
Files 186 188 +2
Lines 15096 16035 +939
========================================
+ Hits 9378 10258 +880
- Misses 5718 5777 +59
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Emantor
approved these changes
Oct 10, 2026
Emantor
left a comment
Member
There was a problem hiding this comment.
Technically that is an API change, in practice I hope this won't be a problem since the converter should take care of it, so LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PDUDaemon has supported non-numeric port identifiers since release v1.1.1 (see pdudaemon/pdudaemon@b30c3327).
PDUDaemonPort.indexwas previously restricted toint, which rejected named ports (e.g."outlet-a") with aValueError. This changesindexto astr, normalizing both numeric and named identifiers to strings so existing numeric configurations keep working unchanged while named ports are now accepted.Verified by:
TestPDUDaemonPort::test_index, covering both a numeric (1->"1") and a named ("outlet-a"->"outlet-a") port identifier.tests/test_powerdriver.pysuite (34 passed, 4 skipped).Checklist
Fixes #1778