refactor: snmp cleanup #4683

Merged
merged 3 commits into from Oct 6, 2016

Projects

None yet

4 participants

@murrant
Contributor
murrant commented Sep 30, 2016

Please note

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

Move common code to turn values to an array to a function.
Many snmp functions become an alias, we can remove those.
snmp_cache_oid_num() has a slight change in result, it doesn't add an extra [''] into the array, just straight $array[$oid] = $value now.
remove unused functions

@murrant murrant refactor: snmp cleanup
Move common code to turn values to an array to a function.
Many snmp functions become alias,  we can remove those.
snmp_cache_oid_num() has a slight change in result, it doesn't add an extra [''] into the array, just straight $array[$oid] = $value now.
remove unused functions
9d42126
@murrant murrant Add spaces around the split equals.
Removes the need for trim on oid
511c305
-}//end snmp_cache_slotport_oid()
-
-
-function snmp_cache_oid($oid, $device, $array, $mib = 0)
@laf
laf Oct 3, 2016 Member

This is used in ./includes/polling/test.inc.php which whilst we don't actually tell people to use is something we should either bin off or make use of.

@laf
Member
laf commented Oct 3, 2016

Running at home to test.

@laf
Member
laf commented Oct 5, 2016

All good to go, just that one comment about snmp_cache_oid being used in includes/polling/test.inc.php

@laf laf added Core Blocker and removed Needs-Verification labels Oct 5, 2016
@laf laf Removed polling test file
e9e8c5c
@laf laf removed the Blocker label Oct 6, 2016
@scrutinizer-notifier

The inspection completed: 29 new issues, 9 updated code elements

@laf laf merged commit 07e8e9f into librenms:master Oct 6, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@murrant
Contributor
murrant commented Oct 7, 2016

Yeah, I figured this would break stuff. Need to document things.

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