From 03785c4365ba289c1442562e7701eb5c3003402d Mon Sep 17 00:00:00 2001 From: Eric Miller <> Date: Fri, 18 Jul 2008 03:11:38 +0000 Subject: [PATCH] POD coverage --- Info/CDP.pm | 2 +- Info/CiscoPortSecurity.pm | 2 +- Info/CiscoStack.pm | 17 ++++++++ Info/EtherLike.pm | 10 +++++ Info/Layer1.pm | 6 +++ Info/Layer1/Asante.pm | 19 +++++++++ Info/Layer2/C2900.pm | 4 ++ Info/Layer2/Netgear.pm | 23 +++++++++++ Info/Layer3/AlteonAD.pm | 4 ++ Info/Layer3/BayRS.pm | 21 +++++++++- Info/Layer3/C3550.pm | 4 ++ Info/Layer3/C4000.pm | 36 +++++++++++++++++ Info/Layer3/C6500.pm | 4 ++ Info/Layer3/Contivity.pm | 8 +++- Info/Layer3/Dell.pm | 17 ++++++++ Info/Layer3/Enterasys.pm | 28 +++++++++++-- Info/Layer3/Extreme.pm | 82 ++++++++++++++++++++++++++++++++++++++- Info/Layer3/Foundry.pm | 9 +++++ Info/Layer3/Juniper.pm | 16 +++++--- Info/Layer3/Microsoft.pm | 25 ++++++++++-- Info/Layer3/N1600.pm | 4 ++ Info/Layer3/NetSNMP.pm | 16 ++++++++ Info/Layer3/Sun.pm | 25 ++++++++++-- Info/MAU.pm | 5 ++- Info/NortelStack.pm | 2 +- 25 files changed, 363 insertions(+), 26 deletions(-) diff --git a/Info/CDP.pm b/Info/CDP.pm index 689dcad9..12dbbd5d 100644 --- a/Info/CDP.pm +++ b/Info/CDP.pm @@ -426,7 +426,7 @@ for decimal placement. =over -=item munge_power() +=item $cdp->munge_power() Inserts a decimal at the proper location. diff --git a/Info/CiscoPortSecurity.pm b/Info/CiscoPortSecurity.pm index f936fffb..d5953c14 100644 --- a/Info/CiscoPortSecurity.pm +++ b/Info/CiscoPortSecurity.pm @@ -369,7 +369,7 @@ The source MAC address carried in the most recently received EAPOL frame. =over -=item munge_pae_capabilities() +=item $cps->munge_pae_capabilities() Return either C<'dot1xPaePortAuthCapable'> or C<'dot1xPaePortSuppCapable'> based upon bit value. diff --git a/Info/CiscoStack.pm b/Info/CiscoStack.pm index 946da036..e30643bf 100644 --- a/Info/CiscoStack.pm +++ b/Info/CiscoStack.pm @@ -395,6 +395,12 @@ the port administrative speed (C) which if set to autonegotiate then the duplex will also autonegotiate, otherwise it uses the reported port duplex (C). +=item $stack->i_speed_admin() + +Returns reference to hash of iid to administrative speed setting. + +C + =item $stack->set_i_speed_admin(speed, ifIndex) Sets port speed, must be supplied with speed and port C @@ -603,4 +609,15 @@ C =back +=head1 Data Munging Callback Subroutines + +=over + +=item $stack->munge_port_status() + +Munges binary byte describing each port into ascii, and returns an ascii +list separated by spaces. + +=back + =cut diff --git a/Info/EtherLike.pm b/Info/EtherLike.pm index d212e294..bf36120e 100644 --- a/Info/EtherLike.pm +++ b/Info/EtherLike.pm @@ -246,4 +246,14 @@ Returns reference to hash. Indexes Stats Table to Duplex Status of port. =back +=head1 Data Munging Callback Subroutines + +=over + +=item $el->munge_el_duplex() + +Removes 'Duplex' from the end of a string. + +=back + =cut diff --git a/Info/Layer1.pm b/Info/Layer1.pm index ce2e9777..9fac0dff 100644 --- a/Info/Layer1.pm +++ b/Info/Layer1.pm @@ -292,10 +292,16 @@ to a hash. =item $l1->interfaces() +Returns reference to the map between IID and physical Port. + =item $l1->i_up() +Returns reference to map of IIDs to link status. + =item $l1->i_up_admin() +Returns reference to map of IIDs to administrative link status. + =back =head2 Repeater MIB diff --git a/Info/Layer1/Asante.pm b/Info/Layer1/Asante.pm index 9746ec4d..30e812fb 100644 --- a/Info/Layer1/Asante.pm +++ b/Info/Layer1/Asante.pm @@ -163,7 +163,9 @@ sub i_name { return \%i_name; } + 1; + __END__ =head1 NAME @@ -249,6 +251,19 @@ See L for details. =over +=item $asante->interfaces() + +Returns reference to the map between IID and physical Port. + +=item $asante->i_description() + +Description of the interface. + +=item $asante->i_mac() + +MAC address of the interface. Note this is just the MAC of the port, not +anything connected to it. + =item $asante->i_name() Returns reference to map of IIDs to human-set port name. @@ -258,6 +273,10 @@ Returns reference to map of IIDs to human-set port name. Returns reference to map of IIDs to link status. Changes the values of asante_up() to 'up' and 'down'. +=item $asante->i_speed() + +Speed of the link, human format. + =back =head2 Asante MIB diff --git a/Info/Layer2/C2900.pm b/Info/Layer2/C2900.pm index 58daaf00..d9d18ffe 100644 --- a/Info/Layer2/C2900.pm +++ b/Info/Layer2/C2900.pm @@ -295,6 +295,10 @@ These are methods that return scalar value from SNMP Returns 'cisco' :) +=item $c2900->cisco_comm_indexing() + +Returns 1. Use vlan indexing. + =back =head2 Globals imported from SNMP::Info::CiscoVTP diff --git a/Info/Layer2/Netgear.pm b/Info/Layer2/Netgear.pm index e7beed5e..7c16f5f5 100644 --- a/Info/Layer2/Netgear.pm +++ b/Info/Layer2/Netgear.pm @@ -176,6 +176,29 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. +=head2 Overrides + +=over + +=item $netgear->fw_mac() + +Returns reference to hash of forwarding table MAC Addresses. + +Some devices don't implement the C forwarding table, so we use +the C forwarding table. Fall back to the C if +C doesn't return anything. + +=item $netgear->fw_port() + +Returns reference to hash of forwarding table entries port interface +identifier (iid) + +Some devices don't implement the C forwarding table, so we use +the C forwarding table. Fall back to the C if +C doesn't return anything. + +=back + =head2 Table Methods imported from SNMP::Info::Layer2 See documentation in L for details. diff --git a/Info/Layer3/AlteonAD.pm b/Info/Layer3/AlteonAD.pm index efe57eb7..dbf1e379 100644 --- a/Info/Layer3/AlteonAD.pm +++ b/Info/Layer3/AlteonAD.pm @@ -486,6 +486,10 @@ IDs. These are the VLANs which are members of the egress list for the port. print "Port: $port VLAN: $vlan\n"; } +=item $alteon->v_index() + +Returns VLAN IDs + =item $alteon->v_name() Human-entered name for vlans. diff --git a/Info/Layer3/BayRS.pm b/Info/Layer3/BayRS.pm index e8338e6a..63b35f05 100644 --- a/Info/Layer3/BayRS.pm +++ b/Info/Layer3/BayRS.pm @@ -1501,8 +1501,11 @@ class only returns container and module types. =item $bayrs->e_descr() -Returns reference to hash. Key: IID, Value: Human friendly name. This is only -available for processors, link modules, and hardware modules. +Returns reference to hash. Key: IID, Value: Human friendly name. + +=item $bayrs->e_name() + +Returns reference to hash. Key: IID, Value: Human friendly name. =item $bayrs->e_hwver() @@ -1557,4 +1560,18 @@ See documentation in L for details. See documentation in L for details. +=head1 Data Munging Callback Subroutines + +=over + +=item $extreme->munge_hw_rev() + +Converts octets to a decimal major.minor string. + +=item $extreme->munge_wf_serial() + +Coverts octets to a decimal string. + +=back + =cut diff --git a/Info/Layer3/C3550.pm b/Info/Layer3/C3550.pm index 5866d91c..4b1a773c 100644 --- a/Info/Layer3/C3550.pm +++ b/Info/Layer3/C3550.pm @@ -328,6 +328,10 @@ Will take the translated model number and try to format it better. Tries to cull the number of ports from the model number. +=item $c3550->cisco_comm_indexing() + +Returns 1. Use vlan indexing. + =back =head2 Globals imported from SNMP::Info::Layer3 diff --git a/Info/Layer3/C4000.pm b/Info/Layer3/C4000.pm index 9365afaf..429e9c8c 100644 --- a/Info/Layer3/C4000.pm +++ b/Info/Layer3/C4000.pm @@ -212,6 +212,20 @@ See L for its own MIB requirements. These are methods that return scalar value from SNMP +=head2 Overrides + +=over + +=item $c4000->cisco_comm_indexing() + +Returns 1. Use vlan indexing. + +=item $c4000->fan() + +Returns fan status + +=back + =head2 Global Methods imported from SNMP::Info::CiscoVTP See documentation in L for details. @@ -249,6 +263,28 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. +=head2 Overrides + +=over + +=item $c4000->i_duplex() + +Parses mau_index and mau_link to return the duplex information for +interfaces. + +=item $c4000->i_duplex_admin() + +Parses C,C,C in +order to find the admin duplex setting for all the interfaces. + +Returns either (auto,full,half). + +=item $c4000->i_speed_admin() + +Returns administrative speed for interfaces. + +=back + =head2 Table Methods imported from SNMP::Info::CiscoVTP See documentation in L for details. diff --git a/Info/Layer3/C6500.pm b/Info/Layer3/C6500.pm index 9552324e..c0bc4720 100644 --- a/Info/Layer3/C6500.pm +++ b/Info/Layer3/C6500.pm @@ -294,6 +294,10 @@ These are methods that return scalar value from SNMP Returns 'cisco' +=item $c6500->cisco_comm_indexing() + +Returns 1. Use vlan indexing. + =back =head2 Global Methods imported from SNMP::Info::CiscoVTP diff --git a/Info/Layer3/Contivity.pm b/Info/Layer3/Contivity.pm index e6afe2ac..1f4a18c1 100644 --- a/Info/Layer3/Contivity.pm +++ b/Info/Layer3/Contivity.pm @@ -292,8 +292,12 @@ to a hash. =item $contivity->interfaces() -Returns reference to the map between IID and physical Port. Skips loopback and -tunnel interfaces. +Returns reference to the map between IID and physical Port. Skips loopback +and tunnel interfaces. + +=item $contivity->i_name() + +Interface Name field. Skips loopback and tunnel interfaces. =back diff --git a/Info/Layer3/Dell.pm b/Info/Layer3/Dell.pm index 4c61f831..e1056409 100644 --- a/Info/Layer3/Dell.pm +++ b/Info/Layer3/Dell.pm @@ -391,6 +391,23 @@ sometimes not unique. Returns reference to hash of iid to current link administrative duplex setting. +=item $dell->fw_mac() + +Returns reference to hash of forwarding table MAC Addresses. + +Some devices don't implement the C forwarding table, so we use +the C forwarding table. Fall back to the C if +C doesn't return anything. + +=item $dell->fw_port() + +Returns reference to hash of forwarding table entries port interface +identifier (iid) + +Some devices don't implement the C forwarding table, so we use +the C forwarding table. Fall back to the C if +C doesn't return anything. + =back =head2 Table Methods imported from SNMP::Info::Layer3 diff --git a/Info/Layer3/Enterasys.pm b/Info/Layer3/Enterasys.pm index 09a83447..c3034cb6 100644 --- a/Info/Layer3/Enterasys.pm +++ b/Info/Layer3/Enterasys.pm @@ -390,6 +390,10 @@ Returns enterasys Returns enterasys +=item $enterasys->os_ver() + +Returns os version extracted from C + =item $enterasys->mac() Returns base mac @@ -429,11 +433,16 @@ to a hash. =over +=item $enterasys->interfaces() + +Mapping between the Interface Table Index (iid) and the physical port name. + =item $enterasys->i_ignore() Returns reference to hash. Creates a key for each IID that should be ignored. -Currently looks for rs232, tunnel,loopback,lo,null from $enterasys->interfaces() +Currently looks for rs232, tunnel,loopback,lo,null from +$enterasys->interfaces() =item $enterasys->i_duplex() @@ -444,6 +453,17 @@ See documentation for mau_i_duplex() in L. See documentation for mau_i_duplex_admin() in L. +=item $enterasys->fw_mac() + +Returns reference to hash of forwarding table MAC Addresses. + +=item $enterasys->fw_port() + +Returns reference to hash of forwarding table entries port interface +identifier (iid). + +(C) + =back =head2 Topology information @@ -474,9 +494,9 @@ Returns reference to hash. Key: iid Value: remote IPv4 address If multiple entries exist with the same local port, c_if(), with the same IPv4 address, c_ip(), it may be a duplicate entry. -If multiple entries exist with the same local port, c_if(), with different IPv4 -addresses, c_ip(), there is either a non-CDP/LLDP device in between two or -more devices or multiple devices which are not directly connected. +If multiple entries exist with the same local port, c_if(), with different +IPv4 addresses, c_ip(), there is either a non-CDP/LLDP device in between two +or more devices or multiple devices which are not directly connected. Use the data from the Layer2 Topology Table below to dig deeper. diff --git a/Info/Layer3/Extreme.pm b/Info/Layer3/Extreme.pm index c119aa4d..09d057ac 100644 --- a/Info/Layer3/Extreme.pm +++ b/Info/Layer3/Extreme.pm @@ -481,6 +481,7 @@ sub set_add_i_vlan_tagged { } 1; + __END__ =head1 NAME @@ -563,6 +564,10 @@ Returns extreme Returns extreme +=item $extreme->os_ver() + +Parses device operating system version from description() + =item $extreme->serial() Returns serial number @@ -581,6 +586,12 @@ Returns status of power supply 1 (C) +=item $extreme->ps2_status() + +Returns status of power supply 2 + +(C) + =item $extreme->fan() Returns fan status @@ -618,6 +629,29 @@ to a hash. =over +=item $extreme->interfaces() + +Returns a mapping between the Interface Table Index (iid) and the physical +port name. + +=item $extreme->i_duplex() + +Parses mau_index and mau_link to return the duplex information for +interfaces. + +=item $extreme->i_duplex_admin() + +Parses C,C,C in +order to find the admin duplex setting for all the interfaces. + +Returns either (auto,full,half). + +=item $extreme->i_ignore() + +Returns reference to hash. Increments value of IID if port is to be ignored. + +Ignores VLAN meta interfaces and loopback + =item $extreme->fw_mac() (C) @@ -634,7 +668,32 @@ to a hash. Returns a mapping between C and the VLAN. -=item $stack->bp_index() +=item $extreme->i_vlan_membership() + +Returns reference to hash of arrays: key = C, value = array of VLAN +IDs. These are the VLANs which are members of the egress list for the port. + + Example: + my $interfaces = $extreme->interfaces(); + my $vlans = $extreme->i_vlan_membership(); + + foreach my $iid (sort keys %$interfaces) { + my $port = $interfaces->{$iid}; + my $vlan = join(',', sort(@{$vlans->{$iid}})); + print "Port: $port VLAN: $vlan\n"; + } + +=item $extreme->v_index() + +Returns VLAN IDs + +=item $extreme->v_name() + +Returns VLAN names + +(C) + +=item $extreme->bp_index() Returns reference to hash of bridge port table entries map back to interface identifier (iid) @@ -652,6 +711,13 @@ See documentation in L for details. See documentation in L for details. +=head1 SET METHODS + +These are methods that provide SNMP set functionality for overridden methods +or provide a simpler interface to complex set operations. See +L for general information on set +operations. + =over =item $extreme->set_i_vlan ( vlan, ifIndex ) @@ -697,4 +763,18 @@ with the numeric VLAN ID and port C. =back +=head1 Data Munging Callback Subroutines + +=over + +=item $extreme->munge_power_stat() + +Removes 'present' and changes 'not' to 'Not' in the front of a string. + +=item $extreme->munge_true_ok() + +Replaces 'true' with "OK" and 'false' with "Not OK". + +=back + =cut diff --git a/Info/Layer3/Foundry.pm b/Info/Layer3/Foundry.pm index b0c409e6..f4594d2d 100644 --- a/Info/Layer3/Foundry.pm +++ b/Info/Layer3/Foundry.pm @@ -561,6 +561,15 @@ Returns reference to hash of interface link duplex status. Crosses $foundry->sw_duplex() with $foundry->sw_index() +=item $foundry->stp_p_state() + +"The port's current state as defined by application of the Spanning Tree +Protocol. + +Skipped if device is an EdgeIron 24G due to reports of hangs. + +(C) + =back =head2 Foundry Switch Port Information Table (C) diff --git a/Info/Layer3/Juniper.pm b/Info/Layer3/Juniper.pm index c2dee83c..448970ac 100644 --- a/Info/Layer3/Juniper.pm +++ b/Info/Layer3/Juniper.pm @@ -176,20 +176,26 @@ These are methods that return scalar value from SNMP =item $juniper->vendor() - Returns 'juniper' +Returns C<'juniper'> =item $juniper->os() - Returns 'junos' +Returns C<'junos'> =item $juniper->os_ver() - Returns the software version extracted from sysDescr. +Returns the software version extracted from C. =item $juniper->model() - Returns the model from sysObjectID, with jnxProductName - removed from the beginning. +Returns the model from C, with C from the +beginning. + +=item $juniper->serial() + +Returns serial number + +(C) =back diff --git a/Info/Layer3/Microsoft.pm b/Info/Layer3/Microsoft.pm index b1be7643..6e2b52c4 100644 --- a/Info/Layer3/Microsoft.pm +++ b/Info/Layer3/Microsoft.pm @@ -149,23 +149,29 @@ See L for its own MIB requirements. These are methods that return scalar value from SNMP +=head2 Overrides + =over =item $router->vendor() - Returns 'microsoft' +Returns C<'microsoft'> =item $router->os() - Returns 'windows' +Returns C<'windows'> =item $router->os_ver() - Returns nothing. +Returns '' =item $router->model() - Returns 'Windows Router' +Returns C<'Windows Router'> + +=item $router->serial() + +Returns '' =back @@ -178,6 +184,17 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. +=head2 Overrides + +=over + +=item $router->interfaces() + +Map the Interfaces to their physical names. Adds interface number to +interface name because identical interface cards return identical C. + +=back + =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/Info/Layer3/N1600.pm b/Info/Layer3/N1600.pm index debc7781..ae803b12 100644 --- a/Info/Layer3/N1600.pm +++ b/Info/Layer3/N1600.pm @@ -249,6 +249,10 @@ Returns 'nortel' Returns 'passport' +=item $n1600->os_ver() + +Returns os version extracted from C. + =back =head2 Overrides diff --git a/Info/Layer3/NetSNMP.pm b/Info/Layer3/NetSNMP.pm index a80f70aa..bf08f34f 100644 --- a/Info/Layer3/NetSNMP.pm +++ b/Info/Layer3/NetSNMP.pm @@ -203,6 +203,10 @@ Returns the system uptime instead of the agent uptime. NOTE: discontinuity timers and other Time Stamp based objects are based on agent uptime, so use orig_uptime(). +=item $netsnmp->serial() + +Returns ''. + =back =head2 Globals imported from SNMP::Info::Layer3 @@ -214,6 +218,18 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. +=head2 Overrides + +=over + +=item $netsnmp->i_ignore() + +Returns reference to hash. Increments value of IID if port is to be ignored. + +Ignores loopback + +=back + =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/Info/Layer3/Sun.pm b/Info/Layer3/Sun.pm index eeea65c3..be0130d4 100644 --- a/Info/Layer3/Sun.pm +++ b/Info/Layer3/Sun.pm @@ -104,6 +104,7 @@ sub i_ignore { } 1; + __END__ =head1 NAME @@ -159,19 +160,23 @@ These are methods that return scalar value from SNMP =item $sun->vendor() - Returns 'sun' +Returns 'sun' =item $sun->os() - Returns 'sun' +Returns 'sun' =item $sun->os_ver() - Returns the software version extracted from motd. +Returns the software version extracted from message of the day. =item $sun->model() - Returns 'Solaris Router' +Returns 'Solaris Router' + +=item $sun->serial() + +Returns serial number =back @@ -184,6 +189,18 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. +=head2 Overrides + +=over + +=item $sun->i_ignore() + +Returns reference to hash. Increments value of IID if port is to be ignored. + +Ignores loopback + +=back + =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/Info/MAU.pm b/Info/MAU.pm index 335097e2..b2cd8b6c 100644 --- a/Info/MAU.pm +++ b/Info/MAU.pm @@ -346,6 +346,10 @@ order to find the admin duplex setting for all the interfaces. Returns either (auto,none,full,half). +=item $mau->mau_i_speed_admin() + +Returns admin speed setting for all the interfaces. + =back =head2 MAU INTERFACE TABLE METHODS @@ -429,7 +433,6 @@ capabilities we are broadcasting on that port (C) - =item $mau->mau_autorec() - Returns a 32 bit bit-string representing the capabilities of the device on the other end. diff --git a/Info/NortelStack.pm b/Info/NortelStack.pm index 916428fb..7ef1e47e 100644 --- a/Info/NortelStack.pm +++ b/Info/NortelStack.pm @@ -893,7 +893,7 @@ is not contained in any other entity. =over -=item munge_ns_grp_type() +=item $stack->munge_ns_grp_type() Munges C into an C equivalent.