From 5e865c9af123b23414254fc61367b6544d01c04e Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 30 Apr 2015 09:49:26 +0200 Subject: [PATCH] Enhancement of vmware connector options --- centreon-plugins/apps/vmware/connector/custom/connector.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/centreon-plugins/apps/vmware/connector/custom/connector.pm b/centreon-plugins/apps/vmware/connector/custom/connector.pm index 765ba4519..cbe23cb5a 100644 --- a/centreon-plugins/apps/vmware/connector/custom/connector.pm +++ b/centreon-plugins/apps/vmware/connector/custom/connector.pm @@ -121,7 +121,9 @@ sub check_options { $self->{vsphere_username} = (defined($self->{option_results}->{vsphere_username})) ? shift(@{$self->{option_results}->{vsphere_username}}) : undef; $self->{vsphere_password} = (defined($self->{option_results}->{vsphere_password})) ? shift(@{$self->{option_results}->{vsphere_password}}) : undef; - if (!defined($self->{connector_hostname})) { + $self->{connector_port} = 5700 if ($self->{connector_port} eq ''); + $self->{container} = 'default' if ($self->{container} eq ''); + if (!defined($self->{connector_hostname}) || $self->{connector_hostname} eq '') { $self->{output}->add_option_msg(short_msg => "Please set option --connector-hostname."); $self->{output}->option_exit(); }