New global

This commit is contained in:
Eric A. Miller
2012-11-27 23:05:23 -05:00
parent af65bb3a2b
commit a83bc1bcb2

View File

@@ -66,6 +66,7 @@ $VERSION = '2.08';
'ps1_status' => 'snChasPwrSupplyOperStatus.1',
'fan' => 'snChasFanOperStatus.1',
'img_ver' => 'snAgImgVer',
'ch_serial' => 'snChasSerNum',
);
@@ -205,10 +206,10 @@ sub serial {
my $foundry = shift;
# Return chassis serial number if available
return $foundry->snChasSerNum() if ( $foundry->snChasSerNum() );
return $foundry->ch_serial() if ( $foundry->ch_serial() );
# If no chassis serial use first module serial
my $mod_serials = $foundry->snAgentConfigModuleSerialNumber();
my $mod_serials = $foundry->snAgentConfigModuleSerialNumber() || {};
foreach my $mod ( sort keys %$mod_serials ) {
my $serial = $mod_serials->{$mod} || '';
@@ -406,6 +407,12 @@ Returns device image version.
(C<snAgImgVer.0>)
=item $foundry->ch_serial()
Returns chassis serial number.
(C<snChasSerNum.0>)
=back
=head2 Global Methods imported from SNMP::Info::Layer3