WIP: centreon-vmware 3.0.0

This commit is contained in:
garnier-quentin 2019-01-31 13:15:24 +01:00
parent 678d326761
commit dd81333233
4 changed files with 9 additions and 15 deletions

View File

@ -29,7 +29,7 @@ use File::Basename;
use Digest::MD5 qw(md5_hex); use Digest::MD5 qw(md5_hex);
use POSIX ":sys_wait_h"; use POSIX ":sys_wait_h";
use JSON::XS; use JSON::XS;
use centreon::script; use centreon::vmware::script;
use centreon::vmware::common; use centreon::vmware::common;
use centreon::vmware::connector; use centreon::vmware::connector;
@ -51,7 +51,7 @@ BEGIN {
}; };
} }
use base qw(centreon::script); use base qw(centreon::vmware::script);
use vars qw(%centreon_vmware_config); use vars qw(%centreon_vmware_config);
my $VERSION = "3.0.0"; my $VERSION = "3.0.0";
@ -98,12 +98,7 @@ my @load_modules = (
sub new { sub new {
my $class = shift; my $class = shift;
my $self = $class->SUPER::new("centreon_vmware", my $self = $class->SUPER::new("centreon_vmware");
# we keep it if we use centreon common library
centreon_db_conn => 0,
centstorage_db_conn => 0,
noconfig => 1
);
bless $self, $class; bless $self, $class;
$self->add_options( $self->add_options(

View File

@ -26,7 +26,6 @@ use ZMQ::LibZMQ4;
use ZMQ::Constants qw(:all); use ZMQ::Constants qw(:all);
use File::Basename; use File::Basename;
use POSIX ":sys_wait_h"; use POSIX ":sys_wait_h";
use centreon::script;
use centreon::vmware::common; use centreon::vmware::common;
my %handlers = (TERM => {}, HUP => {}, CHLD => {}); my %handlers = (TERM => {}, HUP => {}, CHLD => {});

View File

@ -16,11 +16,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
package centreon::common::logger; package centreon::vmware::logger;
=head1 NOM =head1 NOM
centreon::common::logger - Simple logging module centreon::vmware::logger - Simple logging module
=head1 SYNOPSIS =head1 SYNOPSIS
@ -31,7 +31,7 @@ centreon::common::logger - Simple logging module
use centreon::polling; use centreon::polling;
my $logger = new centreon::common::logger(); my $logger = new centreon::vmware::logger();
$logger->writeLogInfo("information"); $logger->writeLogInfo("information");

View File

@ -16,14 +16,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
package centreon::script; package centreon::vmware::script;
use strict; use strict;
use warnings; use warnings;
use FindBin; use FindBin;
use Getopt::Long; use Getopt::Long;
use Pod::Usage; use Pod::Usage;
use centreon::common::logger; use centreon::vmware::logger;
$SIG{__DIE__} = sub { $SIG{__DIE__} = sub {
return unless defined $^S and $^S == 0; # Ignore errors in eval return unless defined $^S and $^S == 0; # Ignore errors in eval
@ -44,7 +44,7 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{name} = $name; $self->{name} = $name;
$self->{logger} = centreon::common::logger->new(); $self->{logger} = centreon::vmware::logger->new();
$self->{options} = { $self->{options} = {
"logfile=s" => \$self->{log_file}, "logfile=s" => \$self->{log_file},
"severity=s" => \$self->{severity}, "severity=s" => \$self->{severity},