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

add linux / cumulus support #6

Merged
merged 1 commit into from
Jul 5, 2014
Merged

add linux / cumulus support #6

merged 1 commit into from
Jul 5, 2014

Conversation

thomas-mangin
Copy link
Contributor

This is a slightly modified version of what I used to be able to get IXLeeds Cumulus switches SNMP discovered. As I saw a feature request for generic Linux, I also added it, it was not tested but the regex works:

> snmpwalk -c <you are kinding ritght ?> -On -v 2c 127.0.0.1 .1.3.6.1.2.1.1.1.0
.1.3.6.1.2.1.1.1.0 = STRING: "Linux ixleeds1 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64"

>>> print re.compile('Linux ([^ ]+) ([^ ]+)-([^ ]+) #[^ ]+-([^ ]+) SMP ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) (.*)').search('Linux ixleeds1 3.11.0-23-generic #40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014 x86_64').groups()
('ixleeds1', '3.11.0-23', 'generic', 'Ubuntu', 'Wed', 'Jun', '4', '21:05:23', 'UTC', '2014', 'x86_64')

barryo added a commit that referenced this pull request Jul 5, 2014
add linux / cumulus support
@barryo barryo merged commit b37ee0f into opensolutions:master Jul 5, 2014
@dorkmatt
Copy link

dorkmatt commented Jul 8, 2014

For detecting @CumulusNetworks, any reason not use to use the well known sysObjectID? This has the Cumulus Networks well know registered enterprise OID.

# snmpwalk -v2c -c w00f 127.0.0.1 system.sysObjectID.0
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.40310

@thomas-mangin
Copy link
Contributor Author

When adding the feature, I used the template for other vendors which have more than one line of product and for which the string can be used to identify the hardware used. This OID could be used but it would require two SNMP get as we would still need to gather the time for, so I see no reason to change it unless you are planning to change your kernel format string, as we rely on the "+" separator which is unique to Cumulus AFAIK.

@barryo
Copy link
Member

barryo commented Jul 8, 2014

@dorkmatt - no reason not to. In fact, the platform discovery documentation welcomes these ideas 😄

See c4bc88b which now allows for the use of $sysObjectID in platform discover (and it's already populated).

@thomas-mangin I suggest $sysObjectID is a better (and safer) way to determine Cumulus kit. I have no way of testing so I have not amended the code.

@thomas-mangin
Copy link
Contributor Author

@barryo I agree it is a safer way ( the uname string are not really a defined API ). I can test the code.

@MHammett MHammett mentioned this pull request Apr 18, 2017
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

3 participants