Add support for sntasmedia interface (USB NVMe ASMedia bridge) #98
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.
Problem
DeviceList()was raising aValueErrorwhen encountering devices with thesntasmediainterface type, which is used by Samsung Portable SSD T7 and similar devices connected via USB NVMe ASMedia bridges:This occurred because the
sntasmediainterface type was not registered in the supported interface types dictionary.Solution
This PR adds support for the
sntasmediainterface with minimal, surgical changes:1. Interface Registration (
pySMART/utils.py)Added
sntasmediato thesmartctl_type_dict, mapping it to itself (similar tonvme,sat, andatacam):2. NVMe Attribute Parsing (
pySMART/device.py)Updated the interface check to treat
sntasmediaas an NVMe device for attribute parsing, since it's a USB-to-NVMe bridge:3. Test Coverage
Added comprehensive test dataset at
tests/dataset/singletests/sntasmedia_nvme_0_issue_97/with:device.jsonwith expected device propertiesTesting
All 203 tests pass, including 6 new tests for the
sntasmediainterface:Impact
sat,atacam)Fixes #97
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.