* Added os() and os_ver()
* Rev to 0.4 * Documentation revamp
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
package SNMP::Info::Layer1::Allied;
|
package SNMP::Info::Layer1::Allied;
|
||||||
$VERSION = 0.3;
|
$VERSION = 0.4;
|
||||||
# $Id$
|
# $Id$
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
@@ -64,6 +64,19 @@ sub vendor {
|
|||||||
return 'allied';
|
return 'allied';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub os {
|
||||||
|
return 'allied';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub os_ver {
|
||||||
|
my $allied = shift;
|
||||||
|
my $descr = $allied->description();
|
||||||
|
|
||||||
|
if ($descr =~ m/version (\d+\.\d+)/){
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub model {
|
sub model {
|
||||||
my $allied = shift;
|
my $allied = shift;
|
||||||
|
|
||||||
@@ -111,57 +124,74 @@ __END__
|
|||||||
|
|
||||||
SNMP::Info::Layer1::Allied - SNMP Interface to old Allied Hubs
|
SNMP::Info::Layer1::Allied - SNMP Interface to old Allied Hubs
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
Provides abstraction to the configuration information obtainable from a
|
|
||||||
Allied device through SNMP. See inherited classes' documentation for
|
|
||||||
inherited methods.
|
|
||||||
|
|
||||||
Inherits from:
|
|
||||||
|
|
||||||
SNMP::Info::Layer1
|
|
||||||
|
|
||||||
Required MIBs:
|
|
||||||
|
|
||||||
ATI-MIB - Download for your device from http://www.allied-telesyn.com/allied/support/
|
|
||||||
|
|
||||||
MIBs listed in SNMP::Info::Layer1
|
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
Max Baker (C<max@warped.org>)
|
Max Baker (C<max@warped.org>)
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
my $allied = new SNMP::Info::Layer1::Allied(DestHost => 'mycat1900' ,
|
# Let SNMP::Info determine the correct subclass for you.
|
||||||
Community => 'public' );
|
my $allied = new SNMP::Info(
|
||||||
|
AutoSpecify => 1,
|
||||||
|
Debug => 1,
|
||||||
|
# These arguments are passed directly on to SNMP::Session
|
||||||
|
DestHost => 'myhub',
|
||||||
|
Community => 'public',
|
||||||
|
Version => 1
|
||||||
|
)
|
||||||
|
or die "Can't connect to DestHost.\n";
|
||||||
|
|
||||||
=head1 CREATING AN OBJECT
|
my $class = $l1->class();
|
||||||
|
print "SNMP::Info determined this device to fall under subclass : $class\n";
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Provides abstraction to the configuration information obtainable from a
|
||||||
|
Allied device through SNMP. See inherited classes' documentation for
|
||||||
|
inherited methods.
|
||||||
|
|
||||||
|
=head2 Inherited Classes
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item new SNMP::Info::Layer1::Allied()
|
=item SNMP::Info::Layer1
|
||||||
|
|
||||||
Arguments passed to new() are passed on to SNMP::Session::new()
|
=back
|
||||||
|
|
||||||
|
|
||||||
my $allied = new SNMP::Info::Layer1::Allied(
|
=head2 Required MIBs
|
||||||
DestHost => $host,
|
|
||||||
Community => 'public',
|
=over
|
||||||
Version => 3,...
|
|
||||||
)
|
=item ATI-MIB
|
||||||
die "Couldn't connect.\n" unless defined $allied;
|
|
||||||
|
Download for your device from http://www.allied-telesyn.com/allied/support/
|
||||||
|
|
||||||
|
=item Inherited Classes
|
||||||
|
|
||||||
|
MIBs listed in SNMP::Info::Layer1 and its inherited classes.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 GLOBALS
|
=head1 GLOBALS
|
||||||
|
|
||||||
|
These are methods that return scalar value from SNMP
|
||||||
|
|
||||||
|
=head2 Overrides
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item $allied->vendor()
|
=item $allied->vendor()
|
||||||
|
|
||||||
Returns 'allied' :)
|
Returns 'allied' :)
|
||||||
|
|
||||||
|
=item $allied->os()
|
||||||
|
|
||||||
|
Returns 'allied'
|
||||||
|
|
||||||
|
=item $allied->os_ver()
|
||||||
|
|
||||||
|
Culls Version from description()
|
||||||
|
|
||||||
=item $allied->root_ip()
|
=item $allied->root_ip()
|
||||||
|
|
||||||
Returns IP Address of Managed Hub.
|
Returns IP Address of Managed Hub.
|
||||||
@@ -174,6 +204,10 @@ Trys to cull out AT-nnnnX out of the description field.
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
=head2 Global Methods imported from SNMP::Info::Layer1
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Layer1 for details.
|
||||||
|
|
||||||
=head1 TABLE ENTRIES
|
=head1 TABLE ENTRIES
|
||||||
|
|
||||||
=head2 Overrides
|
=head2 Overrides
|
||||||
@@ -205,4 +239,8 @@ the values of ati_up() to 'up' and 'down'.
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
=head2 Table Methods imported from SNMP::Info::Layer1
|
||||||
|
|
||||||
|
See documentation in SNMP::Info::Layer1 for details.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
Reference in New Issue
Block a user