From b9fb232859d62072bfcc4ee9a2c165d5f7693711 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Mon, 26 Nov 2012 19:29:10 -0500 Subject: [PATCH] New globals --- Info/Layer3/Tasman.pm | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/Info/Layer3/Tasman.pm b/Info/Layer3/Tasman.pm index d99e24bc..bf34fdb3 100644 --- a/Info/Layer3/Tasman.pm +++ b/Info/Layer3/Tasman.pm @@ -55,10 +55,14 @@ $VERSION = '2.09'; %GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, %SNMP::Info::MAU::GLOBALS, - 'ps1_type' => 'nnenvPwrsupType.1', - 'ps1_status' => 'nnenvPwrsupStatus.1', - 'ps2_type' => 'nnenvPwrsupType.2', - 'ps2_status' => 'nnenvPwrsupStatus.2', + 'ps1_type' => 'nnenvPwrsupType.1', + 'ps1_status' => 'nnenvPwrsupStatus.1', + 'ps2_type' => 'nnenvPwrsupType.2', + 'ps2_status' => 'nnenvPwrsupStatus.2', + 'nn_sys_ver' => 'nnsysVersion', + 'nn_ch_model' => 'nnchassisModel', + 'nn_ch_op_stat' => 'nnchassisOperStatus', + 'nn_ch_serial' => 'nnchassisSerialNumber', ); %FUNCS = ( @@ -87,7 +91,7 @@ sub os { sub os_ver { my $tasman = shift; - my $version = $tasman->nnsysVersion() || ""; + my $version = $tasman->nn_sys_ver() || ""; my $descr = $tasman->description() || ""; # Newer versions @@ -102,7 +106,7 @@ sub model { my $tasman = shift; my $id = $tasman->id(); - my $ch_model = $tasman->nnchassisModel(); + my $ch_model = $tasman->nn_ch_model(); return $ch_model if $ch_model; @@ -118,12 +122,12 @@ sub serial { # Newer versions of the software redefined the MIB in a non-backwards # compatible manner. Try the old OID first. - my $serial = $tasman->nnchassisOperStatus(); + my $serial = $tasman->nn_ch_op_stat(); # Newer versions populate status, serial should contain some numbers return $serial if ($serial !~ /^\D+$/); # Unfortunately newer versions don't seem to populate the newer OID. - return $tasman->nnchassisSerialNumber(); + return $tasman->nn_ch_serial(); } 1; @@ -225,9 +229,25 @@ Grabs the os version from C (C) =item $tasman->ps2_status() - + (C) +=item $tasman->nn_sys_ver() + +(C) + +=item $tasman->nn_ch_model() + +(C) + +=item $tasman->nn_ch_op_stat() + +(C) + +=item $tasman->nn_ch_serial() + +(C) + =item $tasman->serial() Tries both (C) and (C) as OID's