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

Cisco UCOS Version and Feature Fix #10307

Merged
merged 7 commits into from Jun 7, 2019

Conversation

Projects
None yet
2 participants
@djamp42
Copy link
Contributor

commented Jun 4, 2019

The current OS UCOS encompasses many different Cisco products, this PR is attempting to get the Version and Product name under this OS. Cisco does not provide specific OID's for this information, so this is looking at the installed packages from MIB (SYSAPPL-MIB) to determine what Version and Product we are dealing with. I have tested this with many different products versions and seems to be fine.

The nested looping of the SNMP data isn't ideal, maybe someone can give me a pointers on that one.

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
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

djamp42 added some commits May 30, 2019

Fix Software Version #
I don't think setting $firmware does anything, not to mention the regex wasn't matching correctly. I tested this fix tons of different software versions and they all seem to work.
$version = snmp_get($device, '.1.3.6.1.2.1.54.1.1.1.1.4.1', '-Osqv');
$applistraw = snmpwalk_cache_oid($device, ".1.3.6.1.2.1.54.1.1.1.1.3", array());

This comment has been minimized.

Copy link
@murrant

murrant Jun 5, 2019

Member

You could actually just do a regular snmpwalk: snmp_walk($device, '.1.3.6.1.2.1.54.1.1.1.1.3', '-OQv')
Then use text tools like str_contains() or preg_match() to check for strings.

This comment has been minimized.

Copy link
@djamp42

djamp42 Jun 5, 2019

Author Contributor

Fixed, Much better, thanks!

@murrant murrant added the Device 🖥 label Jun 5, 2019

djamp42 added some commits Jun 5, 2019

@murrant

murrant approved these changes Jun 7, 2019

Copy link
Member

left a comment

Looks good

@murrant murrant merged commit e6ad2b5 into librenms:master Jun 7, 2019

5 of 6 checks passed

Travis CI - Pull Request Build Failed
Details
Inspection Summary
Details
Node: analysis
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.