Small fixes. OIDs moved to MIBs
This commit is contained in:
@@ -27,10 +27,10 @@ our $index = undef;
|
|||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
%SNMP::Info::Layer2::GLOBALS,
|
||||||
'serial_oid' => '.1.3.6.1.2.1.47.1.1.1.1.11.1',
|
'serial_oid' => 'mib-2.47.1.1.1.1.11.1',
|
||||||
'os_ver_oid' => '.1.3.6.1.2.1.47.1.1.1.1.9.1',
|
'os_ver_oid' => 'mib-2.47.1.1.1.1.9.1',
|
||||||
'hw_oid' => '.1.3.6.1.2.1.47.1.1.1.1.2.1',
|
'hw_oid' => 'mib-2.47.1.1.1.1.2.1',
|
||||||
'fw_mac_oid' => '.1.3.6.1.2.1.47.1.1.1.1.11.1',
|
'fw_mac_oid' => 'mib-2.47.1.1.1.1.11.1',
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, );
|
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, );
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ package SNMP::Info::Layer3::Qtech;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer2;
|
|
||||||
use SNMP::Info::Layer3;
|
use SNMP::Info::Layer3;
|
||||||
|
|
||||||
@SNMP::Info::Layer3::Qtech::ISA = qw/SNMP::Info::Layer3 Exporter/;
|
@SNMP::Info::Layer3::Qtech::ISA = qw/SNMP::Info::Layer3 Exporter/;
|
||||||
@@ -18,44 +17,27 @@ our ($VERSION, %GLOBALS, %FUNCS, %MIBS, %MUNGE);
|
|||||||
|
|
||||||
$VERSION = '3.70-135';
|
$VERSION = '3.70-135';
|
||||||
|
|
||||||
%MIBS = (
|
%MIBS = ( %SNMP::Info::Layer3::MIBS, );
|
||||||
%SNMP::Info::Layer2::MIBS,
|
|
||||||
%SNMP::Info::Layer3::MIBS,
|
|
||||||
);
|
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
|
||||||
%SNMP::Info::Layer3::GLOBALS,
|
%SNMP::Info::Layer3::GLOBALS,
|
||||||
'hostname' => '.1.3.6.1.2.1.47.1.1.1.1.7.1',
|
'hostname' => 'mib-2.47.1.1.1.1.7.1',
|
||||||
'model_oid' => '.1.3.6.1.2.1.47.1.1.1.1.13.1',
|
'model_oid' => 'mib-2.47.1.1.1.1.13.1',
|
||||||
'hw_oid' => '.1.3.6.1.2.1.47.1.1.1.1.8.1',
|
'hw_oid' => 'mib-2.47.1.1.1.1.8.1',
|
||||||
'serial_oid' => '.1.3.6.1.2.1.47.1.1.1.1.11.1',
|
'serial_oid' => 'mib-2.47.1.1.1.1.11.1',
|
||||||
'bootrom_oid' => '.1.3.6.1.2.1.47.1.1.1.1.9.1',
|
'bootrom_oid' => 'mib-2.47.1.1.1.1.9.1',
|
||||||
'os_ver_oid' => '.1.3.6.1.2.1.47.1.1.1.1.10.1',
|
'os_ver_oid' => 'mib-2.47.1.1.1.1.10.1',
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
|
||||||
%SNMP::Info::Layer2::FUNCS,
|
|
||||||
%SNMP::Info::Layer3::FUNCS,
|
|
||||||
);
|
|
||||||
|
|
||||||
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::Layer3::MUNGE, );
|
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
|
||||||
|
|
||||||
sub model {
|
sub model {
|
||||||
my $qtech = shift;
|
my $qtech = shift;
|
||||||
my $model = $qtech->model_oid;
|
my $model = $qtech->model_oid;
|
||||||
my $hw = $qtech->hw_oid;
|
my $hw = $qtech->hw_oid;
|
||||||
return $model . ' HW:(' . $hw . ')';
|
return $model . ' HW:' . $hw;
|
||||||
}
|
|
||||||
|
|
||||||
# ifDescr is the same for all interfaces in a class, but the ifName is
|
|
||||||
# unique, so let's use that for port name.
|
|
||||||
sub interfaces {
|
|
||||||
my $qtech = shift;
|
|
||||||
my $partial = shift;
|
|
||||||
|
|
||||||
my $interfaces = $qtech->orig_i_name($partial);
|
|
||||||
return $interfaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub vendor {
|
sub vendor {
|
||||||
@@ -68,13 +50,13 @@ sub os {
|
|||||||
|
|
||||||
sub os_ver {
|
sub os_ver {
|
||||||
my $qtech = shift;
|
my $qtech = shift;
|
||||||
my $os_ver = $qtech->os_ver_oid();
|
my $os_ver = $qtech->os_ver_oid;
|
||||||
return $os_ver . ' Bootrom: ' . $qtech->bootrom_oid;
|
return $os_ver . ' bootrom: ' . $qtech->bootrom_oid;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub serial {
|
sub serial {
|
||||||
my $qtech = shift;
|
my $qtech = shift;
|
||||||
my $serial = $qtech->serial_oid();
|
my $serial = $qtech->serial_oid;
|
||||||
return $serial;
|
return $serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +110,7 @@ Returns the ID or else description.
|
|||||||
|
|
||||||
=item $qtech->vendor()
|
=item $qtech->vendor()
|
||||||
|
|
||||||
Returns 'dlink'.
|
Returns 'qtech'.
|
||||||
|
|
||||||
=item $qtech->serial()
|
=item $qtech->serial()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user