This commit is contained in:
Bill Fenner
2008-08-01 08:10:47 +00:00
parent 347e1f9f59
commit cfd5c5d9d7
2 changed files with 103 additions and 109 deletions

View File

@@ -2,21 +2,21 @@
# $Id$
#
# Copyright (c) 2008 Bill Fenner
#
# Redistribution and use in source and binary forms, with or without
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
@@ -35,34 +35,25 @@ use Exporter;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::Timetra::ISA = qw/SNMP::Info::Layer3
Exporter/;
Exporter/;
@SNMP::Info::Layer3::Timetra::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
'TIMETRA-GLOBAL-MIB' => 'timetraReg',
);
%MIBS = ( %SNMP::Info::Layer3::MIBS, 'TIMETRA-GLOBAL-MIB' => 'timetraReg', );
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
);
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, );
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
);
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
sub model {
my $timetra = shift;
my $id = $timetra->id();
my $model = &SNMP::translateObj($id);
my $id = $timetra->id();
my $model = &SNMP::translateObj($id);
return $id unless defined $model;
@@ -83,8 +74,8 @@ sub os_ver {
my $timetra = shift;
my $descr = $timetra->description();
if ($descr =~ m/^TiMOS-(\S+)/) {
return $1;
if ( $descr =~ m/^TiMOS-(\S+)/ ) {
return $1;
}
# No clue what this will try but hey
@@ -95,7 +86,7 @@ sub os_ver {
# to avoid losing historical information through a configuration change
# we use interface name instead.
sub interfaces {
my $alu = shift;
my $alu = shift;
my $partial = shift;
return $alu->orig_i_name($partial);