1# SNMP::Info::NortelStack
2#
3# Copyright (c) 2008 Eric Miller
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are met:
8#
9#     * Redistributions of source code must retain the above copyright notice,
10#       this list of conditions and the following disclaimer.
11#     * Redistributions in binary form must reproduce the above copyright
12#       notice, this list of conditions and the following disclaimer in the
13#       documentation and/or other materials provided with the distribution.
14#     * Neither the name of the University of California, Santa Cruz nor the
15#       names of its contributors may be used to endorse or promote products
16#       derived from this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.
29
30package SNMP::Info::NortelStack;
31
32use strict;
33use warnings;
34use Exporter;
35use SNMP::Info;
36
37@SNMP::Info::NortelStack::ISA       = qw/SNMP::Info Exporter/;
38@SNMP::Info::NortelStack::EXPORT_OK = qw//;
39
40our ($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE);
41
42$VERSION = '3.81';
43
44%MIBS = (
45
46    # S5-ROOT-MIB and S5-TCS-MIB required by the MIBs below
47    'S5-AGENT-MIB'   => 's5AgMyGrpIndx',
48    'S5-CHASSIS-MIB' => 's5ChasType',
49    'S5-REG-MIB'     => 's5ChasTypeVal',
50);
51
52%GLOBALS = (
53
54    # From S5-AGENT-MIB
55    'ns_ag_ver'    => 's5AgInfoVer',
56    'ns_op_mode'   => 's5AgSysCurrentOperationalMode',
57    'ns_auto_pvid' => 's5AgSysAutoPvid',
58    'tftp_host'    => 's5AgSysTftpServerAddress',
59    'tftp_file'    => 's5AgSysBinaryConfigFilename',
60    'tftp_action'  => 's5AgInfoFileAction',
61    'tftp_result'  => 's5AgInfoFileStatus',
62    'vlan'         => 's5AgSysManagementVlanId',
63
64    # From S5-CHASSIS-MIB
65    'ns_serial'   => 's5ChasSerNum',
66    'ns_ch_type'  => 's5ChasType',
67    'ns_cfg_chg'  => 's5ChasGblConfChngs',
68    'ns_cfg_time' => 's5ChasGblConfLstChng',
69);
70
71%FUNCS = (
72
73    # From S5-AGENT-MIB::s5AgMyIfTable
74    'i_cfg_file' => 's5AgMyIfCfgFname',
75    'i_cfg_host' => 's5AgMyIfLdSvrAddr',
76
77    # From S5-CHASSIS-MIB::s5ChasGrpTable
78    'ns_grp_type' => 's5ChasGrpType',
79
80    # From S5-CHASSIS-MIB::s5ChasComTable
81    'ns_com_grp_idx' => 's5ChasComGrpIndx',
82    'ns_com_idx'     => 's5ChasComIndx',
83    'ns_com_sub_idx' => 's5ChasComSubIndx',
84    'ns_com_type'    => 's5ChasComType',
85    'ns_com_descr'   => 's5ChasComDescr',
86    'ns_com_ver'     => 's5ChasComVer',
87    'ns_com_serial'  => 's5ChasComSerNum',
88
89    # From S5-CHASSIS-MIB::s5ChasStoreTable
90    'ns_store_grp_idx' => 's5ChasStoreGrpIndx',
91    'ns_store_com_idx' => 's5ChasStoreComIndx',
92    'ns_store_sub_idx' => 's5ChasStoreSubIndx',
93    'ns_store_idx'     => 's5ChasStoreIndx',
94    'ns_store_type'    => 's5ChasStoreType',
95    'ns_store_size'    => 's5ChasStoreCurSize',
96    'ns_store_ver'     => 's5ChasStoreCntntVer',
97);
98
99%MUNGE = (
100    'ns_ch_type'    => \&SNMP::Info::munge_e_type,
101    'ns_grp_type'   => \&munge_ns_grp_type,
102    'ns_com_type'   => \&SNMP::Info::munge_e_type,
103    'ns_store_type' => \&SNMP::Info::munge_e_type,
104);
105
106sub os_ver {
107    my $stack = shift;
108
109    my $ver = $stack->ns_ag_ver();
110    return unless defined $ver;
111
112    if ( $ver =~ m/(\d+\.\d+\.\d+\.\d+)/ ) {
113        return $1;
114    }
115    if ( $ver =~ m/V(\d+\.\d+\.\d+)/i ) {
116        return $1;
117    }
118    return;
119}
120
121sub os_bin {
122    my $stack = shift;
123
124    my $ver = $stack->ns_ag_ver();
125    return unless defined $ver;
126
127    if ( $ver =~ m/(\d+\.\d+\.\d+\.\d+)/i ) {
128        return $1;
129    }
130    if ( $ver =~ m/V(\d+\.\d+.\d+)/i ) {
131        return $1;
132    }
133    return;
134}
135
136# Need to override here since overridden in Layer2 and Layer3 classes
137sub serial {
138    my $stack = shift;
139
140    my $ver = $stack->ns_serial();
141    return $ver unless !defined $ver;
142
143    return;
144}
145
146# Pseudo ENTITY-MIB methods for older switches with don't support ENTITY-MIB
147
148# This class supports both stackable and chassis based switches, identify if
149# we have a stackable so that we return appropriate entPhysicalClass
150sub _ns_e_is_virtual {
151    my $stack = shift;
152
153    # We really only need one value, but we want this cached since most
154    # methods call it at least via ns_e_index()
155    my $v_test = $stack->s5ChasComRelPos() || {};
156    return $v_test->{'8.1.0'};
157}
158
159# Identify is the stackable is actually a stack vs. single switch
160sub _ns_e_is_stack {
161    my $stack = shift;
162
163    my $s_test = $stack->ns_e_class() || {};
164
165    foreach my $iid ( keys %$s_test ) {
166        my $class = $s_test->{$iid};
167        next unless defined $class;
168        return 1 if ( $class eq 'stack' );
169    }
170    return 0;
171}
172
173sub ns_e_index {
174    my $stack   = shift;
175    my $partial = shift;
176
177    my $ns_e_idx = $stack->ns_com_grp_idx($partial) || {};
178    my $is_virtual = $stack->_ns_e_is_virtual();
179
180    my %ns_e_index;
181    foreach my $iid ( keys %$ns_e_idx ) {
182
183        # Skip backplane, power, sensor, fan, clock - these aren't in the
184        # newer devices ENTITY-MIB we're emulating
185        next if ( $iid =~ /^[24567]/ );
186        next if ( ($is_virtual) and ( $iid =~ /^8/ or $iid eq '1.0.0' ) );
187
188        # Format into consistent integer format so that numeric sorting works
189        my $index = join( '', map { sprintf "%02d", $_ } split /\./, $iid );
190        $ns_e_index{$iid} = $index;
191    }
192    return \%ns_e_index;
193}
194
195sub ns_e_class {
196    my $stack   = shift;
197    my $partial = shift;
198
199    my $ns_e_idx   = $stack->ns_e_index($partial) || {};
200    my $classes    = $stack->ns_grp_type();
201    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
202    my $is_virtual = $stack->_ns_e_is_virtual();
203
204    my %ns_e_class;
205    foreach my $iid ( keys %$ns_e_idx ) {
206        my ( $grp, $idx, $sub ) = split( /\./, $iid );
207        next unless defined $grp;
208        my $class = $classes->{$grp};
209        next unless defined $class;
210        my $enc = $ns_grp_enc->{$grp};
211
212        # Handle quirks of dealing with both stacks and chassis
213        if ( ( !$is_virtual ) and ( $grp == 1 ) ) {
214            $class = 'module';
215        }
216        if ( ($is_virtual) and ( $grp == 3 ) and !( $idx % $enc ) ) {
217            $class = 'chassis';
218        }
219
220        $ns_e_class{$iid} = $class;
221    }
222    return \%ns_e_class;
223}
224
225sub ns_e_descr {
226    my $stack   = shift;
227    my $partial = shift;
228
229    my $ns_e_idx   = $stack->ns_e_index($partial)   || {};
230    my $ns_e_descr = $stack->ns_com_descr($partial) || {};
231
232    my %ns_e_descr;
233    foreach my $iid ( keys %$ns_e_idx ) {
234        my $descr = $ns_e_descr->{$iid};
235        next unless defined $descr;
236
237        $ns_e_descr{$iid} = $descr;
238    }
239    return \%ns_e_descr;
240}
241
242sub ns_e_name {
243    my $stack   = shift;
244    my $partial = shift;
245
246    my $ns_class   = $stack->ns_e_class()                    || {};
247    my $ns_e_idx   = $stack->ns_e_index()                    || {};
248    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
249    my $is_virtual = $stack->_ns_e_is_virtual();
250
251    my %ns_e_name;
252    foreach my $iid ( keys %$ns_e_idx ) {
253
254        my ( $grp, $idx, $sub ) = split( /\./, $iid );
255        my $class = $ns_class->{$iid};
256        next unless defined $class;
257        my $enc = $ns_grp_enc->{$grp};
258
259        if ( ( !$is_virtual ) and ( $grp == 1 ) ) {
260            $ns_e_name{$iid} = 'Supervisory Module';
261        }
262        elsif ( $class eq 'stack' ) {
263            $ns_e_name{$iid} = 'Stack Master Unit';
264        }
265        elsif ( $class eq 'chassis' ) {
266            if ($is_virtual) {
267                my $unit = $idx / $enc;
268                $ns_e_name{$iid} = "Switch Unit $unit";
269            }
270            else {
271                $ns_e_name{$iid} = "Chassis";
272            }
273        }
274        elsif ( $class eq 'module' ) {
275            if ($is_virtual) {
276                my $unit = int( $idx / $enc );
277                my $mda  = $idx % $enc;
278                $ns_e_name{$iid} = "Switch Unit $unit, MDA $mda";
279            }
280            elsif ( $sub != 0 ) {
281                $ns_e_name{$iid} = "Module Slot $idx, Subcomponent $sub";
282            }
283            else {
284                $ns_e_name{$iid} = "Module Slot $idx";
285            }
286        }
287    }
288    return \%ns_e_name;
289}
290
291sub ns_e_hwver {
292    my $stack   = shift;
293    my $partial = shift;
294
295    my $ns_e_idx = $stack->ns_e_index($partial) || {};
296    my $ns_e_ver = $stack->ns_com_ver($partial) || {};
297
298    my %ns_e_hwver;
299    foreach my $iid ( keys %$ns_e_idx ) {
300        my $ver = $ns_e_ver->{$iid};
301        next unless defined $ver;
302
303        $ns_e_hwver{$iid} = $ver;
304    }
305    return \%ns_e_hwver;
306}
307
308sub ns_e_vendor {
309    my $stack   = shift;
310    my $partial = shift;
311
312    my $ns_e_idx = $stack->ns_e_index($partial) || {};
313
314    my %ns_e_vendor;
315    foreach my $iid ( keys %$ns_e_idx ) {
316        my $vendor = 'avaya';
317
318        $ns_e_vendor{$iid} = $vendor;
319    }
320    return \%ns_e_vendor;
321}
322
323sub ns_e_serial {
324    my $stack   = shift;
325    my $partial = shift;
326
327    my $ns_e_idx    = $stack->ns_e_index($partial)    || {};
328    my $ns_e_serial = $stack->ns_com_serial($partial) || {};
329
330    my %ns_e_serial;
331    foreach my $iid ( keys %$ns_e_idx ) {
332        my $serial = $ns_e_serial->{$iid};
333        next unless defined $serial;
334
335        $ns_e_serial{$iid} = $serial;
336    }
337    return \%ns_e_serial;
338}
339
340sub ns_e_type {
341    my $stack   = shift;
342    my $partial = shift;
343
344    my $ns_e_idx  = $stack->ns_e_index($partial)  || {};
345    my $ns_e_type = $stack->ns_com_type($partial) || {};
346    my $is_stack  = $stack->_ns_e_is_stack();
347    my $ch_type   = $stack->ns_ch_type();
348
349    my %ns_e_type;
350    foreach my $iid ( keys %$ns_e_idx ) {
351        my $type = $ns_e_type->{$iid};
352        next unless defined $type;
353
354        if ( $is_stack and $iid =~ /^1/ ) {
355            $type = $ch_type;
356        }
357        $ns_e_type{$iid} = $type;
358    }
359    return \%ns_e_type;
360}
361
362sub ns_e_pos {
363    my $stack   = shift;
364    my $partial = shift;
365
366    my $ns_e_idx   = $stack->ns_e_index($partial)            || {};
367    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
368    my $is_stack   = $stack->_ns_e_is_stack();
369    my $is_virtual = $stack->_ns_e_is_virtual();
370
371    my %ns_e_pos;
372    foreach my $iid ( keys %$ns_e_idx ) {
373        my ( $grp, $pos, $idx ) = split( /\./, $iid );
374        next unless defined $grp;
375        next unless defined $pos;
376
377        if ( $grp == 1 ) {
378            if ($is_stack) {
379                $pos = -1;
380            }
381            else {
382                $pos = 99;
383            }
384        }
385        elsif ( $grp == 3 and $idx == 0 ) {
386            my $enc = $ns_grp_enc->{$grp};
387            if ( $is_virtual and ( $pos % $enc ) ) {
388                $pos = int( $pos % $enc );
389            }
390            elsif ( $is_virtual and !$is_stack and !( $pos % $enc ) ) {
391                $pos = -1;
392            }
393            elsif ( $is_virtual and !( $pos % $enc ) ) {
394                $pos = ( $pos / $enc );
395            }
396        }
397        elsif ( !$is_stack and $grp == 3 ) {
398            $pos = $idx;
399        }
400        elsif ( $grp == 8 ) {
401            $pos = -1;
402        }
403        $ns_e_pos{$iid} = $pos;
404    }
405    return \%ns_e_pos;
406}
407
408sub ns_e_fwver {
409    my $stack   = shift;
410    my $partial = shift;
411
412    my $ns_e_idx   = $stack->ns_e_index($partial)            || {};
413    my $ns_e_ver   = $stack->ns_store_ver($partial)          || {};
414    my $ns_e_type  = $stack->ns_store_type($partial)         || {};
415    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
416    my $is_virt    = $stack->_ns_e_is_virtual();
417
418    my %ns_e_fwver;
419    foreach my $iid ( keys %$ns_e_type ) {
420        my $type = $ns_e_type->{$iid};
421        next unless defined $type;
422        next unless $type =~ /(rom|boot|fw)/i;
423        my $ver = $ns_e_ver->{$iid};
424        next unless defined $ver;
425        $iid =~ s/\.\d+$//;
426
427        if ($is_virt) {
428            my ( $grp, $idx, $pos ) = split( /\./, $iid );
429            my $enc = $ns_grp_enc->{$grp};
430            $idx = $idx * $enc;
431            $iid = "3.$idx.$pos";
432        }
433        $ns_e_fwver{$iid} = $ver;
434    }
435    return \%ns_e_fwver;
436}
437
438sub ns_e_swver {
439    my $stack   = shift;
440    my $partial = shift;
441
442    my $ns_e_idx   = $stack->ns_e_index($partial)            || {};
443    my $ns_e_ver   = $stack->ns_store_ver($partial)          || {};
444    my $ns_e_type  = $stack->ns_store_type($partial)         || {};
445    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
446    my $is_virt    = $stack->_ns_e_is_virtual();
447
448    my %ns_e_swver;
449    foreach my $iid ( keys %$ns_e_type ) {
450        my $type = $ns_e_type->{$iid};
451        next unless defined $type;
452        next unless $type =~ /(flash)/i;
453        my $ver = $ns_e_ver->{$iid};
454        next unless defined $ver;
455        $iid =~ s/\.\d+$//;
456
457        if ($is_virt) {
458            my ( $grp, $idx, $pos ) = split( /\./, $iid );
459            my $enc = $ns_grp_enc->{$grp};
460            $idx = $idx * $enc;
461            $iid = "3.$idx.$pos";
462        }
463        $ns_e_swver{$iid} = $ver;
464    }
465    return \%ns_e_swver;
466}
467
468sub ns_e_parent {
469    my $stack   = shift;
470    my $partial = shift;
471
472    my $ns_e_idx   = $stack->ns_e_index($partial)            || {};
473    my $ns_grp_enc = $stack->s5ChasGrpEncodeFactor($partial) || {};
474    my $is_stack   = $stack->_ns_e_is_stack();
475    my $is_virtual = $stack->_ns_e_is_virtual();
476
477    my %ns_e_parent;
478    foreach my $iid ( keys %$ns_e_idx ) {
479        my $index = $ns_e_idx->{$iid};
480        my ( $grp, $idx, $pos ) = split( /\./, $iid );
481        next unless defined $grp;
482        if ( $grp == 8 ) {
483            $ns_e_parent{$iid} = '0';
484        }
485        if ( $grp == 1 ) {
486            if ($is_stack) {
487                $ns_e_parent{$iid} = '0';
488            }
489            else {
490                $ns_e_parent{$iid} = '080100';
491            }
492        }
493        if ( $grp == 3 ) {
494            my $enc = $ns_grp_enc->{$grp};
495            if ( $idx % $enc ) {
496                my $npos   = ( $idx % $enc ) * $enc;
497                my @parent = ( $grp, $npos, $pos );
498                my $parent = join( '', map { sprintf "%02d", $_ } @parent );
499                $ns_e_parent{$iid} = $parent;
500            }
501            elsif ($is_stack) {
502                $ns_e_parent{$iid} = '010100';
503            }
504            elsif ( $is_virtual and !$is_stack ) {
505                $ns_e_parent{$iid} = 0;
506            }
507            elsif ( $pos == 0 ) {
508                $ns_e_parent{$iid} = '080100';
509            }
510            else {
511                my $parent = $iid;
512                $parent =~ s/\.\d+$/\.00/;
513                $parent = join( '', map { sprintf "%02d", $_ } split /\./,
514                    $parent );
515                $ns_e_parent{$iid} = $parent;
516            }
517        }
518        next;
519    }
520    return \%ns_e_parent;
521}
522
523sub munge_ns_grp_type {
524    my $oid = shift;
525
526    my %e_class = (
527        Sup    => 'stack',
528        Bkpl   => 'backplane',
529        Brd    => 'module',
530        Pwr    => 'powerSupply',
531        TmpSnr => 'sensor',
532        Fan    => 'fan',
533        Clk    => 'other',
534        Unit   => 'chassis',
535    );
536
537    my $name = &SNMP::translateObj($oid);
538    $name =~ s/s5ChasGrp//;
539    if ( ( defined($name) ) and ( exists( $e_class{$name} ) ) ) {
540        $name = $e_class{$name};
541    }
542    return $name if defined($name);
543    return $oid;
544}
545
5461;
547
548__END__
549
550=head1 NAME
551
552SNMP::Info::NortelStack - SNMP Interface to the Avaya/Nortel F<S5-AGENT-MIB>
553and F<S5-CHASSIS-MIB>
554
555=head1 AUTHOR
556
557Eric Miller
558
559=head1 SYNOPSIS
560
561 # Let SNMP::Info determine the correct subclass for you.
562 my $stack = new SNMP::Info(
563                    AutoSpecify => 1,
564                    Debug       => 1,
565                    # These arguments are passed directly on to SNMP::Session
566                    DestHost    => 'myswitch',
567                    Community   => 'public',
568                    Version     => 2
569                    )
570    or die "Can't connect to DestHost.\n";
571
572 my $class = $stack->class();
573 print "SNMP::Info determined this device to fall under subclass : $class\n";
574
575=head1 DESCRIPTION
576
577SNMP::Info::NortelStack is a subclass of SNMP::Info that provides an interface
578to F<S5-AGENT-MIB> and F<S5-CHASSIS-MIB>.  These MIBs are used across the
579Avaya/Nortel Stackable Ethernet Switches (BayStack), as well as, older Nortel
580devices such as the Centillion family of ATM switches.
581
582Use or create in a subclass of SNMP::Info.  Do not use directly.
583
584=head2 Inherited Classes
585
586None.
587
588=head2 Required MIBs
589
590=over
591
592=item F<S5-AGENT-MIB>
593
594=item F<S5-CHASSIS-MIB>
595
596=item F<S5-ROOT-MIB> and F<S5-TCS-MIB> are required by the other MIBs.
597
598=back
599
600=head1 GLOBALS
601
602These are methods that return scalar values from SNMP
603
604=over
605
606=item $stack->os_ver()
607
608Returns the software version extracted from (C<s5AgInfoVer>)
609
610=item $stack->os_bin()
611
612Returns the firmware version extracted from (C<s5AgInfoVer>)
613
614=item  $stack->serial()
615
616Returns serial number of the chassis
617
618(C<s5ChasSerNum>)
619
620=item $stack->ns_ag_ver()
621
622Returns the version of the agent in the form
623'major.minor.maintenance[letters]'.
624
625(C<s5AgInfoVer>)
626
627=item $stack->ns_op_mode()
628
629Returns the stacking mode.
630
631(C<s5AgSysCurrentOperationalMode>)
632
633=item $stack->tftp_action()
634
635This object is used to download or upload a config file or an image file.
636
637(C<s5AgInfoFileAction>)
638
639=item $stack->tftp_result()
640
641Returns the status of the latest action as shown by $stack->tftp_action().
642
643(C<s5AgInfoFileStatus>)
644
645=item $stack->ns_auto_pvid()
646
647Returns the value indicating whether adding a port as a member of a VLAN
648automatically results in its PVID being set to be the same as that VLAN ID.
649
650(C<s5AgSysAutoPvid>)
651
652=item $stack->tftp_file()
653
654Name of the binary configuration file that will be downloaded/uploaded when
655the $stack->tftp_action() object is set.
656
657(C<s5AgSysBinaryConfigFilename>)
658
659=item $stack->tftp_host()
660
661The IP address of the TFTP server for all TFTP operations.
662
663(C<s5AgSysTftpServerAddress>)
664
665=item $stack->vlan()
666
667Returns the VLAN ID of the system's management VLAN.
668
669(C<s5AgSysManagementVlanId>)
670
671=item $stack->ch_ser()
672
673Returns the serial number of the chassis.
674
675(C<s5ChasSerNum>)
676
677=item $stack->ns_cfg_chg()
678
679Returns the total number of configuration changes (other than attachment
680changes, or physical additions or removals) in the chassis that have been
681detected since cold/warm start.
682
683(C<s5ChasGblConfChngs>)
684
685=item $stack->ns_cfg_time()
686
687Returns the value of C<sysUpTime> when the last configuration change (other
688than attachment changes, or physical additions or removals) in the chassis
689was detected.
690
691(C<s5ChasGblConfLstChng>)
692
693=back
694
695=head1 TABLE METHODS
696
697These are methods that return tables of information in the form of a reference
698to a hash.
699
700=head2 Agent Interface Table (C<s5AgMyIfTable>)
701
702=over
703
704=item $stack->i_cfg_file()
705
706Returns reference to hash.  Key: Table entry, Value: Name of the file
707
708(C<s5AgMyIfCfgFname>)
709
710=item $stack->i_cfg_host()
711
712Returns reference to hash.  Key: Table entry, Value: IP address of the load
713server
714
715(C<s5AgMyIfLdSvrAddr>)
716
717=back
718
719=head2 Chassis Components Table (C<s5ChasComTable>)
720
721=over
722
723=item $stack->ns_com_grp_idx()
724
725Returns reference to hash.  Key: Table entry, Value: Index of the chassis
726level group which contains this component.
727
728(C<s5ChasComGrpIndx>)
729
730=item $stack->ns_com_idx()
731
732Returns reference to hash.  Key: Table entry, Value: Index of the component
733in the group.  For modules in the 'board' group, this is the slot number.
734
735(C<s5ChasComIndx>)
736
737=item $stack->ns_com_sub_idx()
738
739Returns reference to hash.  Key: Table entry, Value: Index of the
740sub-component in the component.
741
742(C<s5ChasComSubIndx>)
743
744=item $stack->ns_com_type()
745
746Returns reference to hash.  Key: Table entry, Value: Type
747
748(C<s5ChasComType>)
749
750=item $stack->ns_com_descr()
751
752Returns reference to hash.  Key: Table entry, Value: Description
753
754(C<s5ChasComDescr>)
755
756=item $stack->ns_com_ver()
757
758Returns reference to hash.  Key: Table entry, Value: Version
759
760(C<s5ChasComVer>)
761
762=item $stack->ns_com_serial()
763
764Returns reference to hash.  Key: Table entry, Value: Serial Number
765
766(C<s5ChasComSerNum>)
767
768=back
769
770=head2 Storage Area Table (C<s5ChasStoreTable>)
771
772=over
773
774=item $stack->ns_store_grp_idx()
775
776Returns reference to hash.  Key: Table entry, Value: Index of the chassis
777level group.
778
779(C<s5ChasStoreGrpIndx>)
780
781=item $stack->ns_store_idx()
782
783Returns reference to hash.  Key: Table entry, Value: Index of the group.
784
785(C<s5ChasStoreComIndx>)
786
787=item $stack->ns_store_sub_idx()
788
789Returns reference to hash.  Key: Table entry, Value: Index of the
790sub-component.
791
792(C<s5ChasStoreSubIndx>)
793
794=item $stack->ns_store_idx()
795
796Returns reference to hash.  Key: Table entry, Value: Index of the storage
797area.
798
799(C<s5ChasStoreIndx>)
800
801=item $stack->ns_store_type()
802
803Returns reference to hash.  Key: Table entry, Value: Type
804
805(C<s5ChasStoreType>)
806
807=item $stack->ns_store_size()
808
809Returns reference to hash.  Key: Table entry, Value: Size
810
811(C<s5ChasStoreCurSize>)
812
813=item $stack->ns_store_ver()
814
815Returns reference to hash.  Key: Table entry, Value: Version
816
817(C<s5ChasStoreCntntVer>)
818
819=back
820
821=head2 Pseudo F<ENTITY-MIB> information
822
823These methods emulate F<ENTITY-MIB> Physical Table methods using
824F<S5-CHASSIS-MIB>.
825
826=over
827
828=item $stack->ns_e_index()
829
830Returns reference to hash.  Key: IID, Value: Integer, Indices are combined
831into a six digit integer, each index is two digits padded with leading zero if
832required.
833
834=item $stack->ns_e_class()
835
836Returns reference to hash.  Key: IID, Value: General hardware type
837(C<s5ChasGrpDescr>).
838
839Group is stripped from the string.  Values may be Supervisory Module,
840Back Plane, Board, Power Supply, Sensor, Fan, Clock, Unit.
841
842=item $stack->ns_e_descr()
843
844Returns reference to hash.  Key: IID, Value: Human friendly name
845
846(C<s5ChasComDescr>)
847
848=item $stack->ns_e_name()
849
850Returns reference to hash.  Key: IID, Value: Human friendly name
851
852=item $stack->ns_e_hwver()
853
854Returns reference to hash.  Key: IID, Value: Hardware version
855
856(C<s5ChasComVer>)
857
858=item $stack->ns_e_vendor()
859
860Returns reference to hash.  Key: IID, Value: avaya
861
862=item $stack->ns_e_serial()
863
864Returns reference to hash.  Key: IID, Value: Serial number
865
866(C<s5ChasComSerNum>)
867
868=item $stack->ns_e_pos()
869
870Returns reference to hash.  Key: IID, Value: The relative position among all
871entities sharing the same parent.
872
873(C<s5ChasComSubIndx>)
874
875=item $stack->ns_e_type()
876
877Returns reference to hash.  Key: IID, Value: Type of component/sub-component
878as defined under C<s5ChasComTypeVal> in F<S5-REG-MIB>.
879
880=item $stack->ns_e_fwver()
881
882Returns reference to hash.  Key: IID, Value: Firmware revision.
883
884Value of C<s5ChasStoreCntntVer> for entries with rom, boot, or firmware in
885C<s5ChasStoreType>.
886
887=item $stack->ns_e_swver()
888
889Returns reference to hash.  Key: IID, Value: Software revision.
890
891Value of C<s5ChasStoreCntntVer> for entries with "flash" in
892C<s5ChasStoreType>.
893
894=item $stack->ns_e_parent()
895
896Returns reference to hash.  Key: IID, Value: The value of ns_e_index() for the
897entity which 'contains' this entity.  A value of zero indicates	this entity
898is not contained in any other entity.
899
900=back
901
902=head1 Data Munging Callback Subroutines
903
904=over
905
906=item $stack->munge_ns_grp_type()
907
908Munges C<s5ChasGrpType> into an C<ENTITY-MIB PhysicalClass> equivalent.
909
910=back
911
912=cut
913