fix pod for new Cumulus class

This commit is contained in:
Oliver Gorwits
2018-03-03 17:18:29 +00:00
parent e21f22bb3b
commit 6113dd3b98
2 changed files with 54 additions and 50 deletions

View File

@@ -766,6 +766,12 @@ Subclass for Avaya/Nortel Contivity/VPN Routers.
See documentation in L<SNMP::Info::Layer3::Contivity> for details. See documentation in L<SNMP::Info::Layer3::Contivity> for details.
=item SNMP::Info::Layer3::Cumulus
Subclass for Cumulus Networks Routers.
See documentation in L<SNMP::Info::Layer3::Cumulus> for details.
=item SNMP::Info::Layer3::DLink =item SNMP::Info::Layer3::DLink
Subclass for DLink devices. Subclass for DLink devices.

View File

@@ -112,22 +112,22 @@ sub uptime {
return $netsnmp->SUPER::uptime(); return $netsnmp->SUPER::uptime();
} }
sub i_ignore { #sub i_ignore {
my $l3 = shift; # my $l3 = shift;
my $partial = shift; # my $partial = shift;
#
my $interfaces = $l3->interfaces($partial) || {}; # my $interfaces = $l3->interfaces($partial) || {};
#
my %i_ignore; # my %i_ignore;
foreach my $if ( keys %$interfaces ) { # foreach my $if ( keys %$interfaces ) {
#
# lo0 etc # # lo0 etc
if ( $interfaces->{$if} =~ /\blo\d*\b/i ) { # if ( $interfaces->{$if} =~ /\blo\d*\b/i ) {
$i_ignore{$if}++; # $i_ignore{$if}++;
} # }
} # }
return \%i_ignore; # return \%i_ignore;
} #}
sub agg_ports { return agg_ports_lag(@_) } sub agg_ports { return agg_ports_lag(@_) }
@@ -145,7 +145,7 @@ Oliver Gorwits - based on Layer3::NetSNMP implementation
=head1 SYNOPSIS =head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. # Let SNMP::Info determine the correct subclass for you.
my $netsnmp = new SNMP::Info( my $cumulus = new SNMP::Info(
AutoSpecify => 1, AutoSpecify => 1,
Debug => 1, Debug => 1,
DestHost => 'myrouter', DestHost => 'myrouter',
@@ -154,12 +154,12 @@ Oliver Gorwits - based on Layer3::NetSNMP implementation
) )
or die "Can't connect to DestHost.\n"; or die "Can't connect to DestHost.\n";
my $class = $netsnmp->class(); my $class = $cumulus->class();
print "SNMP::Info determined this device to fall under subclass : $class\n"; print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION =head1 DESCRIPTION
Subclass for Generic Net-SNMP devices Subclass for Cumulus Networks devices
=head2 Inherited Classes =head2 Inherited Classes
@@ -185,6 +185,8 @@ See L<SNMP::Info::Layer3> for its own MIB requirements.
See L<SNMP::Info::LLDP> for its own MIB requirements. See L<SNMP::Info::LLDP> for its own MIB requirements.
See L<SNMP::Info::IEEE802dot3ad> for its own MIB requirements.
=back =back
=head1 GLOBALS =head1 GLOBALS
@@ -193,28 +195,27 @@ These are methods that return scalar value from SNMP
=over =over
=item $netsnmp->vendor() =item $cumulus->vendor()
Returns 'Net-SNMP'. Returns 'Cumulus Networks'.
=item $netsnmp->os() =item $cumulus->os()
Returns the OS extracted from C<sysDescr>. Returns 'cumulus'.
=item $netsnmp->os_ver() =item $cumulus->os_ver()
Returns the software version extracted from C<sysDescr>, along Returns the software version extracted from C<sysDescr>.
with the Net-SNMP version.
=item $netsnmp->uptime() =item $cumulus->uptime()
Returns the system uptime instead of the agent uptime. Returns the system uptime instead of the agent uptime.
NOTE: discontinuity timers and other Time Stamp based objects NOTE: discontinuity timers and other Time Stamp based objects
are based on agent uptime, so use orig_uptime(). are based on agent uptime, so use orig_uptime().
=item $netsnmp->serial() =item $l3->model()
Returns ''. Returns the chassis type.
=back =back
@@ -226,20 +227,32 @@ See documentation in L<SNMP::Info::Layer3> for details.
See documentation in L<SNMP::Info::LLDP> for details. See documentation in L<SNMP::Info::LLDP> for details.
=head2 Globals imported from SNMP::Info::IEEE802dot3ad
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
=head1 TABLE ENTRIES =head1 TABLE ENTRIES
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=cut
#=item $cumulus->i_ignore()
#
#Returns reference to hash. Increments value of IID if port is to be ignored.
#
#Ignores loopback
=head2 Overrides =head2 Overrides
=over =over
=item $netsnmp->i_ignore() =item C<agg_ports>
Returns reference to hash. Increments value of IID if port is to be ignored. Returns a HASH reference mapping from slave to master port for each member of
a port bundle on the device. Keys are ifIndex of the slave ports, Values are
Ignores loopback ifIndex of the corresponding master ports.
=back =back
@@ -251,23 +264,8 @@ See documentation in L<SNMP::Info::Layer3> for details.
See documentation in L<SNMP::Info::LLDP> for details. See documentation in L<SNMP::Info::LLDP> for details.
=head1 NOTES =head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
In order to cause SNMP::Info to classify your device into this class, it See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
may be necessary to put a configuration line into your F<snmpd.conf>
similar to
sysobjectid .1.3.6.1.4.1.8072.3.2.N
where N is the object ID for your OS from the C<NET-SNMP-TC> MIB (or
255 if not listed). Some Net-SNMP installations default to an
incorrect return value for C<system.sysObjectId>.
In order to recognize a Net-SNMP device as Layer3, it may be necessary
to put a configuration line similar to
sysservices 76
in your F<snmpd.conf>.
=cut =cut