Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make device exlude/include able to filter by device type and protocol #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tekert
Copy link
Contributor

@tekert tekert commented Jul 23, 2023

Make regex also search inside a device type and protocol fields instead of a hardware name that can change on hardware change/reset.

@tekert tekert force-pushed the better_exclude branch 2 times, most recently from 293e225 to b1955ff Compare July 23, 2023 15:54
Make regex also search inside a device type and protocol fields instead of a hardware name that can change on hardware change/reset.

Signed-off-by: tekert <tekert@gmail.com>
@tekert
Copy link
Contributor Author

tekert commented Jul 23, 2023

This is a simple fix, but it would be better if the user could specify in the regex if they want filtering by protocol, name or type.
There are multiple ways to do this, maybe someone can lay some light.

I'm thinking of creating temp strings with this format "name=sda;type=ata;protocol=ATA"
so one could write:
smartctl.device-exclude="type=scsi|name=sde"
or simply:
smartctl.device-exclude="scsi"

Filter regex with the following string format
"name=<deviceName>;type=<deviceType>;protocol=<deviceProtocol>"

Signed-off-by: tekert <tekert@gmail.com>
@tekert tekert changed the title Device Exlude also filters types and protocols. Make device exlude/include able to filter by device type and protocol Jul 23, 2023
@tekert tekert marked this pull request as ready for review July 23, 2023 18:34
@k0ste
Copy link
Contributor

k0ste commented Jul 29, 2023

Fix for #72 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants