From 4869ab925b28bb72273edf4d7e291991a0d477f4 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Fri, 5 Sep 2014 11:57:45 +0200 Subject: [PATCH] + Cleanup library not used in pm --- apps/activedirectory/local/mode/dcdiag.pm | 1 + apps/activedirectory/local/mode/netdom.pm | 1 + apps/centreon/local/mode/metaservice.pm | 1 - apps/exchange/2010/local/mode/activesyncmailbox.pm | 1 + apps/exchange/2010/local/mode/databases.pm | 1 + apps/exchange/2010/local/mode/imapmailbox.pm | 1 + apps/exchange/2010/local/mode/mapimailbox.pm | 1 + apps/pacemaker/local/mode/crm.pm | 1 + apps/protocols/imap/lib/imap.pm | 1 - apps/protocols/smtp/lib/smtp.pm | 1 - apps/tomcat/web/mode/traffic.pm | 1 - database/informix/mode/longtxs.pm | 1 - example/mode/testcustom.pm | 1 - hardware/server/hpproliant/mode/components/network.pm | 1 + hardware/server/hpproliant/mode/components/sas.pm | 1 - hardware/server/sun/mgmt_cards/mode/showboards.pm | 1 + hardware/server/sun/mgmt_cards/mode/showenvironment.pm | 2 +- hardware/server/sun/mgmt_cards/mode/showfaults.pm | 1 + hardware/server/sun/mseries/mode/domains.pm | 1 - os/solaris/local/mode/lomv120.pm | 1 + snmp_standard/mode/printererror.pm | 1 - storage/emc/clariion/mode/cache.pm | 1 - storage/emc/clariion/mode/faults.pm | 1 - storage/emc/clariion/mode/portstate.pm | 1 - storage/emc/clariion/mode/sp.pm | 1 - storage/emc/clariion/mode/spinfo.pm | 1 - storage/hp/p2000/xmlapi/custom.pm | 1 - storage/hp/p2000/xmlapi/mode/health.pm | 1 - 28 files changed, 12 insertions(+), 17 deletions(-) diff --git a/apps/activedirectory/local/mode/dcdiag.pm b/apps/activedirectory/local/mode/dcdiag.pm index 0d26b90af..5822f72d6 100644 --- a/apps/activedirectory/local/mode/dcdiag.pm +++ b/apps/activedirectory/local/mode/dcdiag.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use File::Basename; use XML::LibXML; use Win32; diff --git a/apps/activedirectory/local/mode/netdom.pm b/apps/activedirectory/local/mode/netdom.pm index 26b3381bc..c902d7289 100644 --- a/apps/activedirectory/local/mode/netdom.pm +++ b/apps/activedirectory/local/mode/netdom.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/apps/centreon/local/mode/metaservice.pm b/apps/centreon/local/mode/metaservice.pm index 7df80a157..2fd50c5af 100644 --- a/apps/centreon/local/mode/metaservice.pm +++ b/apps/centreon/local/mode/metaservice.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; use centreon::common::db; use centreon::common::logger; diff --git a/apps/exchange/2010/local/mode/activesyncmailbox.pm b/apps/exchange/2010/local/mode/activesyncmailbox.pm index c790dde0c..189adb1f2 100644 --- a/apps/exchange/2010/local/mode/activesyncmailbox.pm +++ b/apps/exchange/2010/local/mode/activesyncmailbox.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use centreon::common::powershell::exchange::2010::activesyncmailbox; my %threshold = ('warning' => 'warning', 'critical' => 'critical'); diff --git a/apps/exchange/2010/local/mode/databases.pm b/apps/exchange/2010/local/mode/databases.pm index ce88fa9bd..42dd5b26c 100644 --- a/apps/exchange/2010/local/mode/databases.pm +++ b/apps/exchange/2010/local/mode/databases.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use centreon::common::powershell::exchange::2010::databases; my %threshold = ('warning_mapi' => 'warning', 'critical_mapi' => 'critical', diff --git a/apps/exchange/2010/local/mode/imapmailbox.pm b/apps/exchange/2010/local/mode/imapmailbox.pm index 015abb824..6cdae864c 100644 --- a/apps/exchange/2010/local/mode/imapmailbox.pm +++ b/apps/exchange/2010/local/mode/imapmailbox.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use centreon::common::powershell::exchange::2010::imapmailbox; my %threshold = ('warning' => 'warning', 'critical' => 'critical'); diff --git a/apps/exchange/2010/local/mode/mapimailbox.pm b/apps/exchange/2010/local/mode/mapimailbox.pm index 1185d32f3..ad1ed5551 100644 --- a/apps/exchange/2010/local/mode/mapimailbox.pm +++ b/apps/exchange/2010/local/mode/mapimailbox.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use centreon::common::powershell::exchange::2010::mapimailbox; my %threshold = ('warning_mapi' => 'warning', 'critical_mapi' => 'critical'); diff --git a/apps/pacemaker/local/mode/crm.pm b/apps/pacemaker/local/mode/crm.pm index 720bf7323..85fbdd20e 100644 --- a/apps/pacemaker/local/mode/crm.pm +++ b/apps/pacemaker/local/mode/crm.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/apps/protocols/imap/lib/imap.pm b/apps/protocols/imap/lib/imap.pm index 60702a5d9..363a44bd0 100644 --- a/apps/protocols/imap/lib/imap.pm +++ b/apps/protocols/imap/lib/imap.pm @@ -37,7 +37,6 @@ package apps::protocols::imap::lib::imap; use strict; use warnings; -use centreon::plugins::misc; use Net::IMAP::Simple; my $imap_handle; diff --git a/apps/protocols/smtp/lib/smtp.pm b/apps/protocols/smtp/lib/smtp.pm index 61543e233..0168b33eb 100644 --- a/apps/protocols/smtp/lib/smtp.pm +++ b/apps/protocols/smtp/lib/smtp.pm @@ -37,7 +37,6 @@ package apps::protocols::smtp::lib::smtp; use strict; use warnings; -use centreon::plugins::misc; use Email::Send::SMTP::Gmail; my $smtp_handle; diff --git a/apps/tomcat/web/mode/traffic.pm b/apps/tomcat/web/mode/traffic.pm index 4fe65fe1a..c1b6361d3 100644 --- a/apps/tomcat/web/mode/traffic.pm +++ b/apps/tomcat/web/mode/traffic.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; use centreon::plugins::httplib; -use centreon::plugins::misc; use centreon::plugins::statefile; use Digest::MD5 qw(md5_hex); use XML::XPath; diff --git a/database/informix/mode/longtxs.pm b/database/informix/mode/longtxs.pm index e7556b9c5..37f354e4f 100644 --- a/database/informix/mode/longtxs.pm +++ b/database/informix/mode/longtxs.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/example/mode/testcustom.pm b/example/mode/testcustom.pm index f4bc99828..25db298a9 100644 --- a/example/mode/testcustom.pm +++ b/example/mode/testcustom.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/hardware/server/hpproliant/mode/components/network.pm b/hardware/server/hpproliant/mode/components/network.pm index 7e9773682..018359f36 100644 --- a/hardware/server/hpproliant/mode/components/network.pm +++ b/hardware/server/hpproliant/mode/components/network.pm @@ -37,6 +37,7 @@ package hardware::server::hpproliant::mode::components::network; use strict; use warnings; +use centreon::plugins::misc; my %conditions = ( 1 => ['other', 'CRITICAL'], diff --git a/hardware/server/hpproliant/mode/components/sas.pm b/hardware/server/hpproliant/mode/components/sas.pm index d38f3b71f..2781602ba 100644 --- a/hardware/server/hpproliant/mode/components/sas.pm +++ b/hardware/server/hpproliant/mode/components/sas.pm @@ -37,7 +37,6 @@ package hardware::server::hpproliant::mode::components::sas; use strict; use warnings; -use centreon::plugins::misc; # In 'CPQSCSI-MIB.mib' diff --git a/hardware/server/sun/mgmt_cards/mode/showboards.pm b/hardware/server/sun/mgmt_cards/mode/showboards.pm index 6ca367e8e..66aba64d2 100644 --- a/hardware/server/sun/mgmt_cards/mode/showboards.pm +++ b/hardware/server/sun/mgmt_cards/mode/showboards.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use hardware::server::sun::mgmt_cards::lib::telnet; use centreon::plugins::statefile; diff --git a/hardware/server/sun/mgmt_cards/mode/showenvironment.pm b/hardware/server/sun/mgmt_cards/mode/showenvironment.pm index 50e8fc3f2..c3b145976 100644 --- a/hardware/server/sun/mgmt_cards/mode/showenvironment.pm +++ b/hardware/server/sun/mgmt_cards/mode/showenvironment.pm @@ -39,7 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; - +use centreon::plugins::misc; use hardware::server::sun::mgmt_cards::components::showenvironment::resources qw($thresholds); use hardware::server::sun::mgmt_cards::components::showenvironment::psu; use hardware::server::sun::mgmt_cards::components::showenvironment::fan; diff --git a/hardware/server/sun/mgmt_cards/mode/showfaults.pm b/hardware/server/sun/mgmt_cards/mode/showfaults.pm index 4c3af011f..ad20a166e 100644 --- a/hardware/server/sun/mgmt_cards/mode/showfaults.pm +++ b/hardware/server/sun/mgmt_cards/mode/showfaults.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/hardware/server/sun/mseries/mode/domains.pm b/hardware/server/sun/mseries/mode/domains.pm index d3278d7c4..c91de3109 100644 --- a/hardware/server/sun/mseries/mode/domains.pm +++ b/hardware/server/sun/mseries/mode/domains.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; my %error_status = ( 1 => ["The domain '%s' status is normal", 'OK'], diff --git a/os/solaris/local/mode/lomv120.pm b/os/solaris/local/mode/lomv120.pm index b933ef3f4..f107c534e 100644 --- a/os/solaris/local/mode/lomv120.pm +++ b/os/solaris/local/mode/lomv120.pm @@ -39,6 +39,7 @@ use base qw(centreon::plugins::mode); use strict; use warnings; +use centreon::plugins::misc; use os::solaris::local::mode::lomv120components::fan; use os::solaris::local::mode::lomv120components::psu; use os::solaris::local::mode::lomv120components::voltage; diff --git a/snmp_standard/mode/printererror.pm b/snmp_standard/mode/printererror.pm index 25b077c68..4795614ac 100644 --- a/snmp_standard/mode/printererror.pm +++ b/snmp_standard/mode/printererror.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; my %errors_printer = ( 0 => ["Printer is low paper", 'WARNING'], diff --git a/storage/emc/clariion/mode/cache.pm b/storage/emc/clariion/mode/cache.pm index c9fa1ba57..16b439ad4 100644 --- a/storage/emc/clariion/mode/cache.pm +++ b/storage/emc/clariion/mode/cache.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; my %states = ( read_cache => [ diff --git a/storage/emc/clariion/mode/faults.pm b/storage/emc/clariion/mode/faults.pm index a61326200..afbfa6629 100644 --- a/storage/emc/clariion/mode/faults.pm +++ b/storage/emc/clariion/mode/faults.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/storage/emc/clariion/mode/portstate.pm b/storage/emc/clariion/mode/portstate.pm index da8bb850b..13872a56d 100644 --- a/storage/emc/clariion/mode/portstate.pm +++ b/storage/emc/clariion/mode/portstate.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/storage/emc/clariion/mode/sp.pm b/storage/emc/clariion/mode/sp.pm index c6333022f..e7b24a691 100644 --- a/storage/emc/clariion/mode/sp.pm +++ b/storage/emc/clariion/mode/sp.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; use storage::emc::clariion::mode::spcomponents::fan; use storage::emc::clariion::mode::spcomponents::lcc; use storage::emc::clariion::mode::spcomponents::psu; diff --git a/storage/emc/clariion/mode/spinfo.pm b/storage/emc/clariion/mode/spinfo.pm index 3482f40d6..5ea2cf3f7 100644 --- a/storage/emc/clariion/mode/spinfo.pm +++ b/storage/emc/clariion/mode/spinfo.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; sub new { my ($class, %options) = @_; diff --git a/storage/hp/p2000/xmlapi/custom.pm b/storage/hp/p2000/xmlapi/custom.pm index 87a1afbba..e7852234e 100644 --- a/storage/hp/p2000/xmlapi/custom.pm +++ b/storage/hp/p2000/xmlapi/custom.pm @@ -37,7 +37,6 @@ package storage::hp::p2000::xmlapi::custom; use strict; use warnings; -use centreon::plugins::misc; use centreon::plugins::httplib; use XML::XPath; use Digest::MD5 qw(md5_hex); diff --git a/storage/hp/p2000/xmlapi/mode/health.pm b/storage/hp/p2000/xmlapi/mode/health.pm index 337635017..c0adcbd1c 100644 --- a/storage/hp/p2000/xmlapi/mode/health.pm +++ b/storage/hp/p2000/xmlapi/mode/health.pm @@ -39,7 +39,6 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; use storage::hp::p2000::xmlapi::mode::components::disk; use storage::hp::p2000::xmlapi::mode::components::vdisk; use storage::hp::p2000::xmlapi::mode::components::sensors;