Enhancement of vmware connector options

This commit is contained in:
garnier-quentin 2015-04-30 09:49:26 +02:00
parent 905b2b762f
commit 7440f07e00
1 changed files with 3 additions and 1 deletions

View File

@ -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_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; $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}->add_option_msg(short_msg => "Please set option --connector-hostname.");
$self->{output}->option_exit(); $self->{output}->option_exit();
} }