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

Proper hardware and version identification for SAF #7378

Merged
merged 2 commits into from Sep 27, 2017

Conversation

Projects
None yet
5 participants
@noaheroufus
Contributor

noaheroufus commented Sep 21, 2017

Fixes Issue #7350

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926


This change is Reviewable

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Sep 22, 2017

Member

I know some of the existing code is like this, but this looks extremely fragile.

Any way you can make it nicer with some regex or something?

Member

murrant commented Sep 22, 2017

I know some of the existing code is like this, but this looks extremely fragile.

Any way you can make it nicer with some regex or something?

@kmpanilla

This comment has been minimized.

Show comment
Hide comment
@kmpanilla

kmpanilla Sep 22, 2017

@murrant which lines are looking fragile? All of it?

kmpanilla commented Sep 22, 2017

@murrant which lines are looking fragile? All of it?

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Sep 25, 2017

Member

Say saf adds a semi-colon at some-point? Then it is all broken.

Member

murrant commented Sep 25, 2017

Say saf adds a semi-colon at some-point? Then it is all broken.

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Sep 25, 2017

Member

For example of the sysDescr's listed in the ticket here is a regex that would work:

radio;(CFIP |SAF )?(.*) v([0-9.]*).*SN: ([0-9]+) https://regex101.com/r/33ICT5/3

Then the first group is throw away (CFIP and SAF), the second group is the product name, the third group is the version, and the fourth group is the serial number.

Member

murrant commented Sep 25, 2017

For example of the sysDescr's listed in the ticket here is a regex that would work:

radio;(CFIP |SAF )?(.*) v([0-9.]*).*SN: ([0-9]+) https://regex101.com/r/33ICT5/3

Then the first group is throw away (CFIP and SAF), the second group is the product name, the third group is the version, and the fourth group is the serial number.

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Sep 27, 2017

The inspection completed: 689 Issues, 23 Patches

scrutinizer-notifier commented Sep 27, 2017

The inspection completed: 689 Issues, 23 Patches

@laf laf merged commit 554b40e into librenms:master Sep 27, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.