From 3ea7e98b56a94b91b4a9e36432e8b6c7c0b5bb47 Mon Sep 17 00:00:00 2001 From: Ryan Armstrong Date: Mon, 8 Aug 2016 18:18:57 +0800 Subject: [PATCH] Removed unused get_child_by_label function --- README.md | 7 +++++++ mib2zabbix.pl | 23 ----------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index cf35074..999215c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/mib2zabbix.pl b/mib2zabbix.pl index f48d89d..00c876c 100755 --- a/mib2zabbix.pl +++ b/mib2zabbix.pl @@ -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