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

Fix: Retrieval of hardware and version from AirOS 8.x #6802

Merged
merged 5 commits into from Jun 13, 2017

Conversation

Projects
None yet
6 participants
@corny
Contributor

corny commented Jun 8, 2017

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

I don't have old AirOS devices to test against.

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Jun 8, 2017

Thank you for submitting a PR @corny! We have found the following @laf based on the history of these files to review this PR.

mention-bot commented Jun 8, 2017

Thank you for submitting a PR @corny! We have found the following @laf based on the history of these files to review this PR.

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Jun 8, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Jun 8, 2017

CLA assistant check
All committers have signed the CLA.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 8, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 8, 2017

Member

How sure are you that the OID you've removed isn't used in older / other firmware versions?

It's probably worth converting this to multi_gets and querying both OIDs.

Member

laf commented Jun 8, 2017

How sure are you that the OID you've removed isn't used in older / other firmware versions?

It's probably worth converting this to multi_gets and querying both OIDs.

@laf laf added the Blocker 🚫 label Jun 8, 2017

@corny

This comment has been minimized.

Show comment
Hide comment
@corny

corny Jun 8, 2017

Contributor

As I wrote I don't have any possibility to test it against old devices. Thanks for mentioning multi_gets. I will adjust my code to query both OIDs.

Contributor

corny commented Jun 8, 2017

As I wrote I don't have any possibility to test it against old devices. Thanks for mentioning multi_gets. I will adjust my code to query both OIDs.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 8, 2017

Member

Give us a shout if you need help.

includes/polling/os/tpdin.inc.php has an example of use.

Member

laf commented Jun 8, 2017

Give us a shout if you need help.

includes/polling/os/tpdin.inc.php has an example of use.

@corny

This comment has been minimized.

Show comment
Hide comment
@corny

corny Jun 8, 2017

Contributor

Thanks a lot!

Contributor

corny commented Jun 8, 2017

Thanks a lot!

@corny

This comment has been minimized.

Show comment
Hide comment
@corny

corny Jun 8, 2017

Contributor
snmp_get_multi_oid($device,"dot11manufacturerProductName.5 dot11manufacturerProductName.10", '-OQUs', 'IEEE802dot11-MIB');

always returns an empty result. Now I query product name and version with 10 and then with 5.

Contributor

corny commented Jun 8, 2017

snmp_get_multi_oid($device,"dot11manufacturerProductName.5 dot11manufacturerProductName.10", '-OQUs', 'IEEE802dot11-MIB');

always returns an empty result. Now I query product name and version with 10 and then with 5.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 8, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 9, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 9, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@corny

This comment has been minimized.

Show comment
Hide comment
@corny

corny Jun 13, 2017

Contributor

$result is always an array and it is never empty. Did I ever say I dislike PHP?
I used print_r() to inspect the value of result.

Invalid result:

Array
(
    [] => 
)

Valid result:

Array
(
    [dot11manufacturerProductName.10] => NanoBeam 5AC 19
    [dot11manufacturerProductVersion.10] => XC.qca955x.v8.1.4.34481.170608.1728
)

That means $result has to contain exactly two elements.

Contributor

corny commented Jun 13, 2017

$result is always an array and it is never empty. Did I ever say I dislike PHP?
I used print_r() to inspect the value of result.

Invalid result:

Array
(
    [] => 
)

Valid result:

Array
(
    [dot11manufacturerProductName.10] => NanoBeam 5AC 19
    [dot11manufacturerProductVersion.10] => XC.qca955x.v8.1.4.34481.170608.1728
)

That means $result has to contain exactly two elements.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 13, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 13, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

LibreNMS-CI commented Jun 13, 2017

Auto-Deploy finished, Test PR at http://6802.ci.librenms.org or https://6802.ci.librenms.org

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Jun 13, 2017

The inspection completed: No new issues

scrutinizer-notifier commented Jun 13, 2017

The inspection completed: No new issues

@laf laf merged commit ffb20d9 into librenms:master Jun 13, 2017

3 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 13, 2017

Member

Brill, thanks for the PR and sorry I messed it up a little :)

Member

laf commented Jun 13, 2017

Brill, thanks for the PR and sorry I messed it up a little :)

@corny

This comment has been minimized.

Show comment
Hide comment
@corny

corny Jun 13, 2017

Contributor

My first attempt didn't work either. That's just PHP ^^

Contributor

corny commented Jun 13, 2017

My first attempt didn't work either. That's just PHP ^^

@corny corny deleted the digineo:airos branch Jun 13, 2017

@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.