Removed unused get_child_by_label function
This commit is contained in:
parent
2ac32ded1a
commit
3ea7e98b56
2 changed files with 7 additions and 23 deletions
|
|
@ -52,6 +52,13 @@ tree in a SNMP MIB file.
|
|||
* Net-SNMP
|
||||
* Correctly configured [MIB files](http://net-snmp.sourceforge.net/tutorial/tutorial-5/commands/mib-options.html)
|
||||
|
||||
### Installation
|
||||
|
||||
The following packages satisfy the runtime requirements of the script on the
|
||||
associated operating systems:
|
||||
|
||||
* Ubuntu: `$ apt-get install perl libxml-simple-perl libsnmp-perl'
|
||||
|
||||
### Translations
|
||||
|
||||
This table describes how MIB elements are translated into Zabbix template
|
||||
|
|
|
|||
|
|
@ -387,29 +387,6 @@ sub oid_path {
|
|||
return $path;
|
||||
}
|
||||
|
||||
=head2 get_child_by_label
|
||||
|
||||
Parameters : SNMP::MIB::Node $node
|
||||
(string) $child_label
|
||||
Returns : SNMP::MIB::NODE $child
|
||||
Description : Returns the direct descendant OID of the specified OID
|
||||
if the label name matches, otherwise undef.
|
||||
|
||||
=cut
|
||||
sub get_child_by_label {
|
||||
my ($node, $child_label) = @_;
|
||||
|
||||
if ($node && $child_label) {
|
||||
foreach my $child(@{ $node->{ children } }) {
|
||||
if ($child->{ label } eq $child_label) {
|
||||
return $child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
=head2 node_to_item
|
||||
|
||||
Parameters : SNMP::MIB::Node $node
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue